function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ken_devken_dev 

Block Duplicate Leads - Import Leads

I have triggers in place that will prevent duplicate leads.  In the trigger i use the

Lead.Email.addError() method to put the message that prevents the lead from being created. The problem is when i import a list of leads and there is one duplicate the entire import fails. 

 

Is there an alternate way to prevent the duplicate but not cause the import to fail?

 

thanks

sfdccoder1sfdccoder1

Hello ken_dev,

 

You can modify your lead duplication prevention triggers not to add an error but rather to save the lead with a designated owner (say 'Dups queue') and add a unique suffix to its email.

 

You will also have to define a process for handling leads in with this owner e.g. allert the owner that he needs to do merge these leads.

 

 

HTH 

 

 

hankreardenhankrearden

Ken_Dev, did you try replacing the lead.Email.addError with the owner as Dupes Queue and adding the suffix to the email? 

 

Curious if it was a an easy enough fix.  

 

Thanks.