+ Start a Discussion
Coral RacingCoral Racing 

Data Loader Error

Hello
I am using Data Loadr for the first time to update a small number of records on a Custom object in my Sandbox.  

Initialization is successful but the upsert fails due to a trigger issue I think as i get the following error?

IncidentTrigger_After: execution of AfterInsert

caused by: System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [LastName]: [LastName]

Trigger.IncidentTrigger_After: line 40, column 1



Can anyone help as to what the issue might be?

 I thought about making the trigger inactive in the sandbox to see if this would help, but I cannot seem to do this.

Thanks
Sonya 
Best Answer chosen by Coral Racing
Coral RacingCoral Racing
Thanks for all the help

I ended up Exporting the Object Data changing the field that I needed to update then upserted the new data

Sonya

All Answers

Sonam_SFDCSonam_SFDC
Looking at the error, it appears that the records you are trying to upload have a required field missing..did you happen to check the custom object to see if it have a required field for which the column might be missing in the csv you are trying to upload in data loader..
AshlekhAshlekh
Hi,

The error is showing that some field values is not found in your record which are in your file. So Let check the field which is required in and field the record having that value or not.
 
James LoghryJames Loghry
As others have stated, make sure you have LastName in your CSV file, and also make sure that you have mapped that LastName column in your CSV to the LastName field on your Salesforce object.  You might have to rinse, lather, and repeat if you find similar errors after fixing the LastName exception.
Coral RacingCoral Racing
Hello.  I have done as you all suggested and included the LastName field in my csv file and mapped to that field in my object and I had no errors.  However none of my records seemd to have changed.  I am trying to Updert data to change a field value in records from OPEN status to Closed but not having much success -  any ideas?

Many thanks

Sonya
Coral RacingCoral Racing
Apologies please ignore my last comment (for some reason I can't delete it)  I was a bit hasty!!!   The isue I am having now is that the Last.Name field is available when I try to create a new mapping.   Any ideas?


Thanks

Sonya
Coral RacingCoral Racing
I am getting this error now:

User-added image
Coral RacingCoral Racing
Error being:

Client ID: id value of incorrect type:  xxxxxx
Sonam_SFDCSonam_SFDC
Aah..ok so this looks like you are trying to populate Client on the custom Object which is a lookup field.

When you are populating Lookup fields using the Data Loader, your import file must contain the salesforce.com Record ID of the record you want to link to, not the Name of the record to link to. (Because the Name is not a valid Record ID you receive the "id value of incorrect type: " error).

For example, the error you provided indicates that you were trying to populate the "Client" field, which is a Lookup to Client, say "ABC". To accomplish this, your import file will need to contain ABC's Client Record ID (00X7000000XXXXX) rather than his Name.

Hope this helps!
Coral RacingCoral Racing
Thanks for all the help

I ended up Exporting the Object Data changing the field that I needed to update then upserted the new data

Sonya
This was selected as the best answer