+ Start a Discussion
Marco Schmit 30Marco Schmit 30 

Duplicate Record Item not removed after Account is not longer a duplicate

Hi all,

I'm trying to find out how the Duplicate Record Set/Item objects work.
My scenario:
  1. Create an Account
  2. Create another Account in way that the Duplicate Record warning message pops up
  3. Click Save and Ignore
  4. 2 Duplicate Record Items got created (so far so good)
  5. Change one of the duplicate Accounts, so they are not duplicates anymore
  6. My understanding that the Duplicate Record Items should be deleted now - but they are not
Is my expected behavior incorrect?

Thanks for helping!
Hello Marco,

Unfortunately Duplicate Record Set/Item will not trigger will deleting record and that's reason it is not updating the Duplicate Record Items. It will only work in case of insert and update.

Marco Schmit 30Marco Schmit 30
Hi Neetu,
thanks for your response. I'm not sure if I got your answer correctly. 
"It will only works in case of insert and update" ... of what? The duplicate account or duplicate record item/set?
It also seems to work if the duplicate accounts is deleted. The associated Duplicate Record Set and Items get deleted then as well.

In the end, I want to create a checkbox which is true if the record is an duplicate and false otherwise. Maybe there is another way to accomplish this?
Hello Marco,

You can achieve this by writing trigger. If you are not familiar with apex coding, I can assist you.

Marco Schmit 30Marco Schmit 30
Well, I wanted to avoid rewriting a logic to find duplicats by createing a trigger on the DuplicateRecordItem object to set the checkbox on insert, delete etc. but if those records are not deleted then this approach will not work obviously. 
So I will go the the Trigger approach for each object.

Marco Schmit 30Marco Schmit 30
Winter 18 released the following:

So no need to rewrite any logic to find duplicates
Cheryl Fernandes BNCheryl Fernandes BN
This free app contains a process builder that invokes a flow to delete the Duplicate Record Set record as soon as you merge the Leads, Contacts or Accounts that created the duplicate. https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000EcxYXUAZ