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
ManvithaManvitha 

Batch class to delete duplicate records

Hi All,
 
I am new to  apex programming...so needed some help...
to write a new batch class that will be scheduled daily nightly to pick up records from ‘DuplicateRecordSet’ and find related account  records, keep the latest created/modified account  record and delete others.


Any help or guidance on this will be great !!!
Thanks in advance
VinayVinay (Salesforce Developers) 
Hi Manvitha,

You can check below similar example and make changes as per your requirement.

https://salesforce.stackexchange.com/questions/382192/batch-class-to-remove-duplicate-records

Thanks,