Skip to main content

I've a duplicate rule running on lead object which will block if the new lead comes with an existing email address but i would like to update existing lead some attributes, 

I failed to find an option which matches the record and merge with latest values and also i tried with trigger on Lead(before insert, before update) but no luck.

Can someone please help me to achieve this. thanks in advance.

2 answers
  1. Apr 30, 2021, 7:26 AM
    Hi Ranjith,

     

    Duplicate rules can block a record from being created, but do not give you any option to merge the incoming lead. What you could do instead is use the Apex merge command to merge the lead after it was successfully created (you'll need to deactivate the duplicate rule entirely). The command is described here (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_dml_examples_merge.htm).
0/9000