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
Zahir Basith 4Zahir Basith 4 

Update the lead instead of showing an error, if the lead is found as duplicate

Dear Salesforce experts,

My question put in to simple terms is just this:
In a lead before insert trigger if I identify a lead as a duplicate instead of showing an error message I need to update that lead. Is that possible ? because my current transaction at that point would be an insert operation. I wanted to update that lead instead of showing an error. I will explain you why I want to update that lead ..
See we have customers using web-to-lead from different micro sites which eventually create leads in the same instance. but each micro site works for different housing schemes. So there can be a scenario where a person register an interest through one micro site because he is interested in the scheme that micro site is representing, in that same way that same person maybe interested in another scheme so he register his interest for second scheme through another micro site. in this case we want to update his existing lead with his second interest. Hope you got my question. Can i achieve this through a trigger program.