2

I'm creating new records in Salesforce by using the SOAP API create method. I'm attempting to create several records in one create call. Some of them are successfully created, but others fail due to various reasons. One of the fields I'm setting is an external ID field. Is there any way to link the error records in the create response back to the original record that it was attempting to create? I was hoping that perhaps I could have the external ID field returned so that I could match it back to the original record set. At the moment, I get some error records returned but I have no idea which record it was that failed. I was hoping to avoid creating one record at a time.

1

the returned SaveResult list from create (and update,upsert,delete) is always in the same order as the request, so if the request has record A,B,C and the returned SaveResults have success,success,error you know A & B succeeeded & c has the error.

2
  • Great. Thank you. I can't believe that I missed that in the documentation. One would have thought that returning an ID would be a slightly nicer solution. Feb 24 '14 at 9:26
  • there's no id to return for a failed create.
    – superfell
    Feb 24 '14 at 16:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.