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
Melanie HilliardMelanie Hilliard 

Why does web-to-lead form delete new lead if they are an existing lead record?

Why does web-to-lead form delete new lead if they are an existing lead record?  In other posts I've seen have the oposite problem where new leads are always created.  This is what I need.  We use Pardot forms for all forms subitted from our website, with the exception of one.  it's a web-to-lead form that works with a custome App for people to register for training programs.  Only in this one case do we use a Salesforce web-to-lead form and if the registrant is an existing lead, it adds the person to the correct campaign/member status and then immediately deletes the duplicate lead.  Sounds crazy but we need the "duplicate" lead.  Where would I find customization in Salesforce that overrides the standard functionality of always creating a lead.  We need the duplicate lead!.  Thanks
Best Answer chosen by Melanie Hilliard
jigarshahjigarshah
Melanie.

Try checking for the following within your Salesforce org where the Leads are being created.

1. Apex Triggers (Navigate to Setup > Custom Code > Apex Triggers. Search for all triggers written for the Lead object. Chances are the Apex code to check and delete the duplicate leads could either reside directly within your Apex Trigger or within an Apex class called from the trigger.

2. Process Builders (Navigate to Setup > Process Automation > Process Builder and check for Process Builders written on the Lead object)

3. Check for Duplicate Rules (Navigate to Setup > Duplicate Management > Duplicate Rules and check for rules written on Lead object which specify deleteing the records)

4. Check for Apex Jobs (Navigate to Setup > Envrionments > Jobs > Apex Jobs that are running and modify the Lead object. You will need to check the Apex method written within the Apex Class to check for the code modifyign the Lead object.)

Please mark the thread as SOLVED and answer as the BEST ANSWER if it helps address your issue.

All Answers

jigarshahjigarshah
Melanie.

Try checking for the following within your Salesforce org where the Leads are being created.

1. Apex Triggers (Navigate to Setup > Custom Code > Apex Triggers. Search for all triggers written for the Lead object. Chances are the Apex code to check and delete the duplicate leads could either reside directly within your Apex Trigger or within an Apex class called from the trigger.

2. Process Builders (Navigate to Setup > Process Automation > Process Builder and check for Process Builders written on the Lead object)

3. Check for Duplicate Rules (Navigate to Setup > Duplicate Management > Duplicate Rules and check for rules written on Lead object which specify deleteing the records)

4. Check for Apex Jobs (Navigate to Setup > Envrionments > Jobs > Apex Jobs that are running and modify the Lead object. You will need to check the Apex method written within the Apex Class to check for the code modifyign the Lead object.)

Please mark the thread as SOLVED and answer as the BEST ANSWER if it helps address your issue.
This was selected as the best answer
Melanie HilliardMelanie Hilliard
Thank you for the list of places to check! I found the code in #4 Check for Apex Jobs and then worked back from there to the Apex Class. Kind regards Melanie
jigarshahjigarshah
Melanie,

I am glad I could help you to get it working.

If my answer has helped you please mark it as the best answer. I believe you have marked the wrong answer as the best answer unless you feel otherwise.