• Sam111
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
We have a custom object and around 2 million records. We would like to do a clean up on duplicate records. Like if they have same name, same email, opt out flag etc. I would like to create a batch class to delete the duplicate records and just keep one record.

For ex:

Record1: Name = Name1 Email = name1@name.com opt out = true created date 01/01
Record 2:  Name = Name1 Email = name1@name.com opt out = true created date 02/02
Record 3: Name = Name1 Email = name1@name.com opt out = true created date 03/03

I woul dlike to delete 2 records and keep the most recent created date record. So in this case, delete Record 1 an dRecord 2 and keep Record 3

Can someone help with this batch class? I appreciate your help!
  • September 08, 2016
  • Like
  • 0
We have a custom object and around 2 million records. We would like to do a clean up on duplicate records. Like if they have same name, same email, opt out flag etc. I would like to create a batch class to delete the duplicate records and just keep one record.

For ex:

Record1: Name = Name1 Email = name1@name.com opt out = true created date 01/01
Record 2:  Name = Name1 Email = name1@name.com opt out = true created date 02/02
Record 3: Name = Name1 Email = name1@name.com opt out = true created date 03/03

I woul dlike to delete 2 records and keep the most recent created date record. So in this case, delete Record 1 an dRecord 2 and keep Record 3

Can someone help with this batch class? I appreciate your help!
  • September 08, 2016
  • Like
  • 0