Search Here

10 Common Errors with Salesforce Data loading explained



When loading data into Salesforce, it is extremely common to have errors occur. Here is a list of 10 of the most common errors you will see, what the errors mean, and how to resolve them.

1. Validation Rule Exception

What it means

This one is probably the trickiest to figure out when you are trying to debug a data load in Salesforce. That is because the error isn't coming from a Salesforce restriction, rather a custom validation rule which has been created in your unique instance.

How to resolve it

What makes it especially tricky, is that you will only see the error message which has been created on the validation rule, not the name of the validation rule itself. If the error message is not one of the below, or another that you recognize, chances are it is a custom validation rule so that is the best place to check first.

2. Required fields are missing

What it means

This means that Salesforce has rejected the Insert / Update because a required field on the object is not populated.

How to resolve it

This could either be Standard Salesforce fields, such as Name on Account, or Last Name on Contact, or a custom field which has the 'Required' attribute set to True.

To progress with the data load, make sure that for every records, the required field has a value populated.

3. Use one of these records?

What it means

Another error message which doesn't give you much information, this one actually means that there are Duplicate Rules set up for the object you are importing into. Salesforce has recognized the record as a Duplicate and has rejected it from being created / updated.

NOTE: Even though you have the Duplicate rule set to 'Allow' on Create / Update, records created through Data Loader or dataimporter.io will still be rejected.

How to resolve it

You will either need to Disable the Duplicate Rule, or ensure that the records you are Inserting / Updating are not already in Salesforce. You can also use Dataimporter.io to deduplicate records before the import occurs, to make sure this error doesn't occur.

4. Duplicate external id specified

What it means

When doing an Upsert / Update on multiple records, and the Id values provided are in the data multiple times, the Salesforce will reject the records. This is to prevent multiple updates / inserts happening on the same records at the same time.

How to resolve it

Make sure that there are no Duplicate Ids or External Ids in the source data, as these need to be unique as part of the job upload. One way to get around this is to reduce the batch size of the job so that the likelihood of the same Id being in the same batch is less.

5. Id value of incorrect type

What it means

When you are looking to Update / Upsert records, and you provide the Id field, this error will occur when the Id provided doesn't match the format of the object.

How to resolve it

Make sure you are importing the correct records to the correct objects. A quick check you can do is by checking the first few characters of the Id e.g. 001, 003. For standard objects, the prefixes will always be the same e.g. 001 is an Account record and 003 is a Contact record. There is also a a list of the most common Standard Object Salesforce Prefixes .

6. Entity is deleted

What it means

When trying to Update / Delete a record, this error will occur when the entity has already been deleted in Salesforce.

How to resolve it

If you are looking to Delete the record, then the job is already done for you. If you were looking to Update the record, then you would need to create it again by Inserting it, as the previously referenced record no longer exists.

7. We can't save this record because the "ABC" process failed.

What it means

This is another error which is specific to your Org. The error will specify the name of the Process which has failed e.g. "Account Insert Flow". The error occurs because the job that you have run e.g. Inserting new Accounts has triggered a process in Salesforce to run which has subsequently failed.

How to resolve it

This is a bit trickier, but you will need to have a look into the details of the process to see exactly why it is failing e.g. Validation Rules, Required fields missing etc.

8. Invalid email address

What it means

This is pretty self-explanatory, but Salesforce actually has it's own method for calculating whether an email address is 'invalid' or 'valid', and Salesforce has judged that these records fall into the Invalid category.

How to resolve it

The most common cause is dirty data. Spaces in email addresses e.g. "test@ test.com", multiple @ symbols e.g. "test@test@test.com" or invalid characters such as commas e.g. "test@test,com". Make sure you clean up the email addresses before attempting to Insert / Update them into Salesforce.

9. Invalid Cross Reference Id

What it means

When you are referencing a lookup value when Inserting / Updating records e.g. Inserting Contacts with the AccountId field populated Salesforce will return this error if the Lookup Relationship couldn't be created.

How to resolve it

This will also need some investigation but the most common reasons are that the Id provided is for the wrong Object, or that the Lookup Record has been deleted. Make sure you are referencing the correct Id records, or even easier, using a tool like dataimporter.io which lets you lookup records using any Text value, to make sure the correct Ids are found automatically.

10. Invalid or Null for Restricted Picklist

What it means

This error is shown when you try to Insert / Update a Picklist field with values that are not listed as 'Active' on the Picklist field, and 'Restrict picklist to the values defined in the value set' is set to True.

How to resolve it

The field has been set up, so that only certain values can be selected and entered. If this is correct you will need to fix the data so that only valid values are present. If you still want to enter the values you have in your Insert / Update file, then you will need to set 'Restrict picklist to the values defined in the value set' to False, or add the new Values to the Active Values available on the Picklist Field.

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.