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
Elsa CordonnierElsa Cordonnier 

Trigger to identify Lead duplicate and change Lead status

Hello hello,

I want to know if it's possible to create a trigger which will do the following step:
- Every time that a new lead is created, the trigger need to analyse the entire system to see iff there is already the same lead present in the data base according to two data keys (email address and phone number).
- If a same lead is found, the neew lead has to take Lead Status = "Doublette", then I will set up an automatic email alert to warn our provider that the lead is already existing

Any help is welcomed :)
Thanks a lot for your support

Best
Elsa
 
Prateek Singh SengarPrateek Singh Sengar
Hi Elsa,
Its absolutely possible to write a trigger that will change the status of your duplicate leads as per your criteria. However may i suggest that before you start writting the trigger you check the following appexchange tool

https://appexchange.salesforce.com/listingDetail?listingId=a0N30000003IYLlEAO

In case this tool doesnt suffice your needs please let me know and i can help you with the trigger.
SalesFORCE_enFORCErSalesFORCE_enFORCEr
It is possible but I would recommend to go through Duplicate Management in Salesforce first, may be you need not write a trigger and it will solve your problem.
https://help.salesforce.com/apex/HTViewHelpDoc?id=managing_duplicates_overview.htm&language=en_US
 
CharitardhaV KutcherlapatiCharitardhaV Kutcherlapati
This appExchange tool is not helping me. Can you suggest some other way to execute the above problem without writing the trigger?
Thank You