Search code examples
salesforcebulkupdate

Bulk API Error : InvalidBatch : Field name not found : Id


I am trying to update contact records one field - Ext_Id__c via bulk api. We have created the csv file with two columns and there no whitespaces in the header names.

I am creating the job and pushing the batches to the job via a simple java client. the jab and batches are getting created successfully , however it's not updating the contact , instead it's gving below error:

BATCH STATUS:
[BatchInfo  id='7512D000000XUV0QAO'
 jobId='7502D000000KWQuQAO'
 state='Failed'
 stateMessage='InvalidBatch : Field name not found : LastName'
 .......
..........
 numberRecordsProcessed='0'
 numberRecordsFailed='0'
 totalProcessingTime='0'
 apiActiveProcessingTime='0'
 apexProcessingTime='0'
]

I have all the neccesary access at field level for both fields. Can anyone please help?


Solution

  • So the issue was that , the csv file which we were uploading was saved using the format - "CSV UTF-8 (Comma Delimited (.csv))" :

    See the old Format : 1

    and due to this the system wasn't recognizing the first column header as a valid field - not sure why , may be dur to Bulk API V1.0

    So as a solution , we saved the file in plain csv format , i.e. - "Comma Separated Values (.csv)" ,

    Here is the new format: 2

    and this resolved the issue !!!