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
JavanLJavanL 

"Invalid Batch" error when upserting records via Bulk API

Hello,
I'm getting an "Invalid Batch" error when upserting records via DBAmp that uses the native Salesforce Bulk API. We've had this failure several times and I believe that all permissions have been set appropriately. The last change made to the custom object was 2 new fields that the calling user has write access to.

Please help.
Thanks.
JavanLJavanL
Here's the exact error message provided by the Bulk Data Job log entry:

InvalidBatch : Failed to process CSV file. Upsert requires view all data on a non-unique custom index
jhurstjhurst
JavanL,

This error is saying that if you are using a non-unique field in your upsert (such as LEad.Email, or Contact.Email) you need to have the View All Data on the profile of the running user.

If you add the View All Data permission, the load should work.

Hope this helps.
Jay