1

I'm developing code in java for upload data to Salesforce. All did fine but I've a problem with failed records with bulk API 2.0 with upsert action

I have the next file csv for upload data for Account:

Name, Date_i__c,description,unique_id__c
Account1,2018-02-01,description1,1
Account2,2018-02-01,description2,2
Account3,2018-02-01,description3,3
Account4,2018-X2-01,description4,4

I know that the Account4 is wrong because the format for date is incorrect.

When I check the results:

Ok --> successfulResults (3 records)
Failed --> failedResults (1 record)

In successfulResults is fine, I know that 3 records now are in salesforce but when I check the failed results, is like this:

sf_id,sf_error,Name,Date_i__c,description,unique_id__c
"","description of error", "","","",""

So, I don't know which record is failed! I wait something like this:

sf_id,sf_error,Name,Date_i__c,description,unique_id__c
"","description of error", "Account4","2018-X2-01","description4","4"

In this example maybe is easy because only I have 3 records but if I will have 10,000 records?

I've try many ways to know which are the records failed but I don't have some idea

2
  • 1
    In addition to the successful results file, there should be a failed results file (can't recall what it would be called at the moment). Check your results directory - both will be generated on every bulk job.
    – JaredT
    May 21, 2018 at 15:11
  • 1
    I know that Bulk Api generates 3 paths of results, successful, failed, and unprocessed, so when I check the failed records only show the error but not the record failed information. In unprocessed is empty and It's correct May 21, 2018 at 15:49

1 Answer 1

-1

Check this: Bulk API 2.0 returns failed and success results with empty field values https://help.salesforce.com/s/articleView?id=000349496&type=1

1
  • 1
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review Aug 23, 2022 at 13:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .