2

I'm using auto data loader, and for some weird reason, once I'm upserting a child record into account using external Id, there some record that fails because: "Foreign key external ID: 040525479 not found for field External_Id__c in entity Account"

But here's the thing, the external Id presented on the file and on the system is without 0! For some reason, Data loader (Only the auto data loader using CMD - On the UI version it is OK) is adding 0 to 41 records in the CSV! (out of 1800)

enter image description here

Can you please help me?

3
  • 2
    Can you open the csv file in notepad and check if leading zero exists. – Santanu Boral Mar 29 '17 at 12:29
  • Hi, YES!! wow, Im not sure why it is like this but in the UI version data loader managed to avoid it.. I will try to write a shell script to handle this one. THANKS!! – Alon Segal Mar 29 '17 at 12:32
  • I have post this as answer so other members can be benefited. Would you pls accept this. – Santanu Boral Mar 29 '17 at 14:38
1

Upon viewing excel or .csv file nobody can guarantee the format of Number columns.

It is better to open the .csv file in Notepad or Notepad++ to verify the Number columns.

.csv file always eliminates leading zero in the Number column until and unless the excel is properly formatted as "text".

That's the observation.

One more thing, If you open the file in .csv then never save this from MS Excel, otherwise it will again wrongly formatted. Better to open in Notepad++ and save before using it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.