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

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.

Mark SFMark SF

The results are returned in the same order as the records in the batch request so you should be able to correlate records in your input batch with the returned results.

 

See the doc for more details. The following topic explains how to handle failed records in batches and has relevant information:

http://www.salesforce.com/us/developer/docs/api_asynch/index_Left.htm#StartTopic=Content/asynch_api_batches_failed_records.htm

NK123NK123

This thread might be very old but if any one searching for info, this pointer might help:

 

With the latest Bulk API, you can get the "Request" as well as "Results" from salesforce which can be correlated by record order:

 

https://instance_name—api.salesforce.com/services/async/APIversion/job/jobid/batch/batchId/request

 

~Nk