[SalesForce] Record has no potential duplicates but duplicate record set still exists

I have a duplicate rule on Account that is triggered matching of a field. Once the duplicate rule runs, it identifies two accounts with the same field value as duplicate and a duplicate warning on the account is highlighted. As per Salesforce's documentation, during all this duplicates calculation few other records are created that is DuplicateRecordSet and DuplicateRecordItem.

DuplicateRecordSet
Represents a group of records that have been identified as duplicates. Each duplicate record set contains one or more duplicate record items. Use this object to create custom report types and view the results of duplicate jobs.

Problem with duplicate report

A duplicate report is based on the above objects, DuplicateRecordSet and DuplicateRecordItem to identify, reconcile, and merge duplicate.

If, I update one of the accounts and change the field value on the account, duplicate rule fires and finds a negative match. Hence, the duplicate alert from both the account is removed but the report still shows those two accounts are duplicate because the records in both DuplicateRecordSet object and DuplicateRecordItem, are not deleted once there is a negative match on existing duplicate records.

Now, that report is very important for the client but with these false negative account on the report, is just very odd.

Best Answer

Got an answer from Salesforce that this is working as designed and appears to be limitation. According to this article

Duplicate Record Sets are not automatically deleted even when records no longer meet the criteria in your Duplicate Rules. You can manually delete them by creating a Duplicate Report, and clicking the link for the Duplicate Record Set Name. For more, please review Create Reports on Duplicate Records.

Salesforce proposed solution

To manually delete the Duplicate Record Sets

Lightning Experience

  1. Click the waffle (App Launcher) on the Navigation bar.
  2. Enter Duplicate Record Sets.
  3. Select the Duplicate Record Sets that needs to be deleted.
  4. Click the Delete button.
  5. Click the Delete button again on the pop up window.

Salesforce Classic

  1. Click + (All Tabs) on the Navigation bar.
  2. Search for Duplicate Record Sets.
  3. Select the Duplicate Record Sets that needs to be deleted.
  4. Click the Delete button.
  5. Click OK on the pop up window

Note: Deleting Duplicate Record Sets only deletes the Duplicate Record Items and not the actual records. It is also possible mass delete Duplicate Record Sets using the Mass Delete option or Dataloader.

Related Topic