When records are merged in Salesforce, you choose a record to be used as the Master version of that record, and that Salesforce ID will be preserved. You can choose to populate this record with values from the other duplicates before those duplicate records are deleted.
However, if you accidentally choose the wrong version of the duplicate records as the Master, you may want to restore the other version of the record that was deleted.
This guide will walk you through an example of a record merge, which was made in error and needs to be reversed. We will be using Gearset's Backup solution to do this.
I have two records of similar Accounts: Account to merge into and Account we merge away. Both of these have related Contacts, Opportunities and Cases:
โ
Both of these records have been backed up by Gearset.
Iโm going to merge these records and let the backup run again.
Backup job history shows the merged records have been backed up.
The backup has picked up the following:
1 deleted Account - Account we merge away.
1 changed Account - Account to merge into, which now has additional values from Account we merge away.
4 Changed records for Cases, Contacts and Opportunities - which have a changed
AccountId
from Account we merge away -> Account to merge into
However, during this process, it was found that there was a mistake and we want to return to the state we were in before merging.
To do this we want to view the run and select Restore
for the Account records.
We then select the deleted record and the changed record, like so:
And then select Restore from previous backup
.
Next, we select Records with dependent objects
to make sure we get any related Contact, Cases and Opportunities.
We select all those related records, then click Continue
.
The restoration process will then progress through the Problem Analyzers and Rules and Automation disabling - select these as required. You should then progress to a summary page for restoration, click Deploy Data
:
Once the deployment completes, you should see a page like this:
Your restoration is now complete and your two Account records should be back to how they were previously and the Cases, Contacts and Opportunities should all be with their original parent Account records.
On the subsequent backup, the restoration changes will be picked up as follows:
1 new Account, the restored Account we merge away.
1 changed Account, the reverted Account to merge into.
4 Changed records for Cases, Contacts and Opportunities - which have a changed AccountId from Account to merge into -> Account we merge away.