{"action":"created","issue":{"url":"https://api.github.com/repos/financialforcedev/apex-mdapi/issues/130","repository_url":"https://api.github.com/repos/financialforcedev/apex-mdapi","labels_url":"https://api.github.com/repos/financialforcedev/apex-mdapi/issues/130/labels{/name}","comments_url":"https://api.github.com/repos/financialforcedev/apex-mdapi/issues/130/comments","events_url":"https://api.github.com/repos/financialforcedev/apex-mdapi/issues/130/events","html_url":"https://github.com/financialforcedev/apex-mdapi/issues/130","id":153636434,"number":130,"title":"AssignmentRules issue for Case","user":{"login":"sathishvenks","id":8604328,"avatar_url":"https://avatars.githubusercontent.com/u/8604328?v=3","gravatar_id":"","url":"https://api.github.com/users/sathishvenks","html_url":"https://github.com/sathishvenks","followers_url":"https://api.github.com/users/sathishvenks/followers","following_url":"https://api.github.com/users/sathishvenks/following{/other_user}","gists_url":"https://api.github.com/users/sathishvenks/gists{/gist_id}","starred_url":"https://api.github.com/users/sathishvenks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sathishvenks/subscriptions","organizations_url":"https://api.github.com/users/sathishvenks/orgs","repos_url":"https://api.github.com/users/sathishvenks/repos","events_url":"https://api.github.com/users/sathishvenks/events{/privacy}","received_events_url":"https://api.github.com/users/sathishvenks/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-08T05:25:38Z","updated_at":"2016-05-12T03:34:54Z","closed_at":"2016-05-12T03:34:54Z","body":"This is the readMetadata request and response XMLs got from the code.\r\n\r\nRequest:\r\n\r\n`<readMetadata xmlns=\"http://soap.sforce.com/2006/04/metadata\">\r\n\t\t\t<type>AssignmentRules</type>\r\n\t\t\t<fullNames>Case</fullNames>\r\n\t\t</readMetadata>`\r\n\r\nResponse(truncated):\r\n\r\n`<records xsi:type=\"AssignmentRules\">\r\n               <fullName>Case</fullName>\r\n               <assignmentRule>\r\n                  <fullName>Standard</fullName>\r\n`\r\n\r\nBut when I just amended the criteria and update the metadata, I received Unknown Exception error. Below is the sample UpdateMetadata request and response\r\n\r\nRequest:\r\n`<metadata xsi:type=\"AssignmentRules\">\r\n\t\t\t\t<fullName>Case</fullName>\r\n\t\t\t\t<assignmentRule xsi:type=\"AssignmentRule\">\r\n\t\t\t\t\t<fullName>Standard</fullName>`\r\n\r\nResponse:\r\n`<result>\r\n            <errors>\r\n               <message>unexpected metadata</message>\r\n               <statusCode>UNKNOWN_EXCEPTION</statusCode>\r\n            </errors>\r\n            <fullName>Case</fullName>\r\n            <success>false</success>\r\n         </result>\r\n`\r\nApex example attached\r\n[ApexEx.txt](https://github.com/financialforcedev/apex-mdapi/files/253769/ApexEx.txt)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/financialforcedev/apex-mdapi/issues/comments/218651039","html_url":"https://github.com/financialforcedev/apex-mdapi/issues/130#issuecomment-218651039","issue_url":"https://api.github.com/repos/financialforcedev/apex-mdapi/issues/130","id":218651039,"user":{"login":"afawcett","id":1167760,"avatar_url":"https://avatars.githubusercontent.com/u/1167760?v=3","gravatar_id":"","url":"https://api.github.com/users/afawcett","html_url":"https://github.com/afawcett","followers_url":"https://api.github.com/users/afawcett/followers","following_url":"https://api.github.com/users/afawcett/following{/other_user}","gists_url":"https://api.github.com/users/afawcett/gists{/gist_id}","starred_url":"https://api.github.com/users/afawcett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afawcett/subscriptions","organizations_url":"https://api.github.com/users/afawcett/orgs","repos_url":"https://api.github.com/users/afawcett/repos","events_url":"https://api.github.com/users/afawcett/events{/privacy}","received_events_url":"https://api.github.com/users/afawcett/received_events","type":"User","site_admin":false},"created_at":"2016-05-12T03:34:54Z","updated_at":"2016-05-12T03:34:54Z","body":"This is a [GACK](https://developer.salesforce.com/blogs/engineering/2015/02/gack.html) by the looks of it, a Salesforce internal error, it should have some kind of numbers associated with it though? Since you have the XML request sample this is ideal for passing to Salesforce Support (passing Apex MD code will raise to many unneccessary questions as to how your calling the API). My recommendation is to raise a case and given them a way to reproduce this via something like Developer Workbench or CURL with your sample XML and of course support org login granted. Another option to try retrieving one you created in the UI and pull that down, maybe its missing some fields and there is a platform bug in the error handling? Experiment with different assignment rule setups as well. Ultimatly the time you spend on this can server to have Salesforce support help you more quickly, of course you could go both routes and get a case underway. Hope this helps! 👍 "}}