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
sagarrrrsagarrrr 

Removal of duplicate Leads 1. During the Campaigning, It might happen t hat representative creates duplicate leads in an org.

Hello all,

Removal of duplicate Leads.

1. During the Campaigning, It might happen that representative creates duplicate leads in an org.

2. So admin want to build a process which will run every 3 hours/day
& remove the duplicate leads from the org.

3. The criteria to find the duplicate records should be configurable.
Ex. If there are two leads in a system with same Email address then keep the first lead entry & remove all the other leads.

So the field like Email, Name which will be deciding the uniqueness should be configurable.

I am new for batch apex plz help me thank you.
Uttpal_ChandraUttpal_Chandra
Hi Sagar,

Why you want to create batch class for this insted of that you can easily create trigger so that if representative  create duplicate lead it will not allow them to save the lead.
sagarrrrsagarrrr
Hi Uttpal,

I have to complete this scenario question with the batch class. So can you help me with that?
thank you