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
cap_cordyscap_cordys 

database update after bulk upload issue

We create csv file by reading the data from database into it.

csv format is as below:

 

FirstName,LastName,Description

ABC,XYZ,DEFGH

 

We load the data using SFDC bulk load api.

In response we get the result as below which contains SFDC generated IDs of the records for which upload is successful

 

 "Id","Success","Created","Error"

 "0032000000ZlGn1AAF","true","true",""

 

The result doesn't contain anything from the records in the csv used to upload the data, so we can't map the csv records with the results.

How to update the database records which were uploaded in to salesforce based on the result received?

 

Thanks.

po3211po3211

I had the same issue. I read somewhere in the docs that the results come back in the exact same order that you sent them to the API. So if you keep your list until the results come back, you can just loop through them both together to determine your database key along with the success/failure.

 

It's not ideal by any means and it makes me a little nervous, but it seems to work. I'd much prefer my external id to come back in the results or even better, to specify the key that the results use. Oh well.