function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JepsJeps 

API create call sending 200 records. How to determine what specific record failed to get created

Hi:
 
I'm using create() API call sending sObjects[]  about 200 case objects at one call.  If there are any failed records. 
 
1) How do I determine which specific records failed to get created in Salesforce?
2) Is there are detailed  information about the failed record from the SaveResults object?
 
 
Thanks,
 
Jay
SuperfellSuperfell
create returns an array of SaveResult objects, one for each item in the request, it include the id of the newly created item or an error code & message.
JepsJeps
 
 
Simon:
 
So does array index 0 of SaveResult  match with the array index 0 that i sent?
 
 
-Jay
SuperfellSuperfell
Yes, the arrays are positionally matched.