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
jeremyfrey1jeremyfrey1 

Are create & update calls FIFO?

Here's our problem:
 
We're using the partner WSDL, and we're trying to write a custom data loader for one of our users that will provide additional business logic after that user uploads a CSV file.  Each record in the CSV contains a Contact ID, and additional information, which will used to drive inserts into Event and CampaignMember.  One of my requirements is to display a list of errors in creating those records back to the user, so he can modify his CSV file and re-upload, without creating duplicates.  Obviously, I want to use batching on the creates, but this poses a problem of matching up sObject to SaveResult.  My SaveResults will contain those Objects' primary keys (00U and 00v for Event and CampaignMember, respectively), but not the sObject I used to create them, nor the ContactID I used as a foreign key for both objects.
 
My question is -- can I assume that the create call is FIFO?  I.e., if I upload sObjects a,b,c,d,e, can I be sure that my results a,b,c,d,e will be sent back in that order?
 
Thanks for the help!
 
- Jer
SuperfellSuperfell
Yes, the results order matches the order of the items in the request.
jeremyfrey1jeremyfrey1
Awesome, thanks.  That's how we figured it worked, but we couldn't find the source to the dataloader to know for sure ;)
SuperfellSuperfell
See the API docs for SaveResult

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_create_saveresult.htm#topic-title
adreameradreamer

Does the same applies to the sendEmail() call in the Partner API ?.

 

The documentation on SendEmailResult does not specify this.

 

Thanks,

Fernando