+ Start a Discussion
Jha dilipJha dilip 

Bulk insertion of data using dataloader


i have written a validation rule through apex which prevents creation of duplicate records. this functionality is working fine for single records but when i insert duplicate bulk records through dataloader then it gets inserted. please suggest what can be the issue
Can you post your validation rule so that we can verify. Thank you.
James LoghryJames Loghry
My guess is you're using addError in a trigger to prevent the duplicates.  There are gotchas you have to watch out for here.  For instance, if you call addError, it prevents additional execution of the trigger.  See this post for tips on successfully using addError: https://developer.salesforce.com/forums?id=906F00000008zMpIAI