I'm trying to import some data into a standard object like Account via the DataLoader.

The problem is that, I have a duplicate rule on a specific field, and I set this field as required.

When I want to do an upsert I have this error : "This value already exist" (for the duplicate rule) or if I want to remove the column (to divert the problem) of this field in my .CSV, the error is : "Mandatory fields have not been filled"...

Any advices to solve this problem ? :)

Thanks, and have a good day !

3 Answers 3


We added a custom checkbox field to users called Bypass Validation. In all our validation rules, we use the following.

$User.Bypass_Validation__c = False,
[other logic]

When we checkmark the field on our data loader user, it will ignore the validation rules. When it is unchecked, it will validate the fields as normal. This allows you to keep validation rules active at all times while allowing anyone to bypass the rules or not.


Well, There is no option to disable validation rules, triggers, workflow while importing data using data loader.

There is idea posted for it. https://success.salesforce.com/ideaview?id=087300000007CwUAAU

So, now you will have to use workarounds.

The root of problem seems like you are not passing ID when you are upserting records. if that is the case follow these steps.

  1. You can export data from the table. Do Vlookup in excel and find ID of original record and then import this file (with id) for upsetting and it should work.

  2. Another workaround is just disable the given rule. Note that you may get incorrect data for ex. duplicate rows, missing required values etc.

  • Yes, i saw a lot of articles talking about this. I'm passing the ID, I think this is not the issue. I'll try this tricks : simplysfdc.com/2014/01/…
    – FabienHuot
    Commented Aug 23, 2016 at 11:31

Not an answer, but more of a clarification of the question: I'm not sure on what you meant by duplicate rule on specific field. I'm assuming you mean the field is marked Unique and Required in the field definition.

Given that the uniqueness of the field was put in place for a business reason, maybe the input data needs to be scrubbed to ensure that duplicates should not be part of the dataset.

Related articles which helped: Validation Rule to Check for Duplicate Record Names

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .