Record Merge
How to merge two records of any object, decide which values survive, and see exactly what moved.
Overview
Salesforce merges accounts, contacts, leads and cases, and nothing else. Record Merge works on any object in your org, including custom ones: you pick two records, choose which values the surviving record keeps, and it moves the related records across before deleting the other one.
It reports what it did step by step, and it stops rather than guesses. If something cannot be moved, the record that would have been deleted is kept instead, and the component tells you what is still pointing at it.
Who can merge
Record Merge is gated by its own permission set.
| Permission set | Gives |
|---|---|
| Flourish Core: Record Merge | The ability to use the component, and nothing else |
Flourish Core: Admin already includes it, so an admin needs nothing extra.
Grant this deliberately. A merge runs with full access to the data regardless of who is running it, which is what stops a person's own record access quietly turning a merge into a half-merge. The consequence is that anyone holding this permission can copy field values and move related records they could not otherwise see.
Adding it to a page
In the Lightning App Builder, drag Flourish Core: Record Merge onto a record page or an app page.
| Setting | What it does |
|---|---|
| Object API Name | The object whose records this component merges, for example Account or toflourish__Service_Request__c |
| Maximum Height | How tall the component may grow before its contents scroll inside it, as a CSS length such as 70vh or 640px. Leave it blank for the default. |
On a record page, the record being viewed is offered as the one to keep. That is a starting point rather than a rule, and either picker can be changed.
One component handles one object, so an org that merges households and organizations places two.
Merging
1. Pick the two records
Record to remain is the record that survives. Record to delete is the one whose values and related records move across, and which is then removed.
Each picker leaves the other record out of its results, so you cannot pick the same record twice.
Under Record to delete is an Open in a new tab link. Two records worth merging usually have the same name, so it is worth opening the one you are about to delete and confirming it is the one you mean.
2. Choose how values are decided
Simple merge is the default and behaves the way Salesforce's own merge does: the surviving record keeps every value it already has, and its blanks are filled in from the other record. Nothing it holds is overwritten.
Turn on Advanced to choose field by field.
3. Review
Review shows what the merge would do. Nothing has been written at this point.
In Advanced mode you get a table of fields, alphabetical by label, with both records' values side by side and a Keep or Take choice on each row. Keep leaves the surviving record's value alone; Take replaces it with the other record's.
Only the fields that actually differ are listed. A line under the table counts the rest, and Show fields that match brings them in. Search field names and values looks through every field, not only the ones on screen.
Below that, in both modes, is Related records: everything pointing at the record you are deleting, with a count and what will happen to it.
| Marking | Means |
|---|---|
| Will move | Those records will be repointed at the surviving record |
| Cannot move | The relationship does not allow repointing, so those records stay where they are |
| Deleted with it | Chatter posts and comments, which cannot be moved and go with the record |
Chatter is the one thing a merge loses. It cannot be repointed at another record by any means, so the feed on the record you delete goes with it, exactly as it does in a standard Salesforce merge. A warning above the list names the count so it is a decision rather than a surprise.
Click Merge when the review reads the way you expect, or Back to change the records.
4. Read the result
The merge runs as separate steps: the field copy, then one step per related list, then the delete.
Only the steps worth reading are listed. An object typically has dozens of relationships with nothing in them, and a line at the end counts those rather than listing them.
| Status | Means |
|---|---|
| Done | Finished |
| More to do | There was more work than one run allows. It carries on by itself. |
| Skipped | You chose to leave it alone |
| Failed | It could not be done. The step says how many records were affected. |
| Not done | It was not attempted, because something earlier stopped the merge |
| Deleted with it | Chatter, removed with the record |
| Cannot read | Your org does not answer for that relationship. It does not hold the merge up. |
A large merge can need more than one run, and the component keeps going on its own until it finishes or reaches something that needs a decision from you.
When a merge stops short
The record to delete is removed only once nothing is left pointing at it. If anything is, the merge stops and keeps both records, and that is the headline you get: Merge stopped short.
The Still attached list names what is holding it. What to do depends on which half failed.
A field could not be written. A validation rule or a locked field is the usual cause. The button under the result names the fields it would give up on, as Keep the original Field Name and try again, or offers to keep all of the surviving record's own values where it cannot name them. Either way it puts those values back and runs again, which usually finishes the merge.
Related records could not move. Continue without these leaves them where they are and finishes everything else. Be clear about what that means: those records stay on the record you wanted to delete, so that record is kept too. Skipping a related list can never let the delete go ahead. It is a way to complete the rest of the work and leave one thing to sort out by hand, not a way to force the merge through.
Nothing has to be undone before trying again. Every step can be repeated safely: re-copying a value that is already there does nothing, and a related list whose records already moved finds nothing left to move.
The older merge component
Two components in the package are labeled (Deprecated): the previous single merge and its smart search. They remain installed so that anything already referring to them keeps working, but they no longer do anything, and the merge one names this component when you try to use it.
Nothing needs to be uninstalled or cleaned up. Remove them from any page they are still on and use Flourish Core: Record Merge instead.