Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //this compiles, but throws error:
- //'System.TypeException: Invalid conversion from runtime type LIST<ANY> to LIST<SObject>'
- //when trying to create the list of contacts the object data.
- Map<String, Object> createResponse = (Map<String, Object>)JSON.deserializeUntyped(RestContext.response.responseBody.toString());
- list<sobject> createResponseContacts = (list<sobject>) createResponse.get('sObjects');
- Contact c = (contact) createResponseContacts[0];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement