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

database update after bulk upload

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

csv format is as below:





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





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?


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:


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: