You need to sign in to do that
Don't have an account?

Preventing Duplicate Leads
I'm trying to see if I can utilize the cookbook code for the apex trigger on preventing lead duplicates, but have encountered a serious roadblock - if someone submits a web to lead form that is a duplicate and references it in our database, it completely prevents creation of that lead.
For example:
unique lead in database has email of random@google.com
same person with different company submits another web to lead form, with random@google.com - this lead is never created, and we miss out on it.
Any possible workarounds to this? Is there a way to only trigger when a user manually creates a new lead?
For example:
unique lead in database has email of random@google.com
same person with different company submits another web to lead form, with random@google.com - this lead is never created, and we miss out on it.
Any possible workarounds to this? Is there a way to only trigger when a user manually creates a new lead?
But within the trigger, you can have logic that only really acts on the data (ie prevent the lead) if specific field values are set per your requirement. For example, if the Lead Source != "Web" , then do apply your de-dupe logic. Otherwise, do nothing and let the Lead be created.
here is some psuedo-code:
Apologize if I am hijacking this thread. We have similar requirement with slight variation.
We are okay if some company submits a lead with duplicate email address.
But we don't want to allow a different company to submit a lead with same email which was already submitted.
Can someone help me with this
To verify this, Clone a lead, but modify the Company name before saving. You should see the sample error message "add error here" (which you can modify in the apex code I provided)