Merge Accounts and Contact in Lightning like Classic

Hey there! 🙂

In today’s article, we shall discuss a quick and simple hack which will help us Merge Accounts and Contacts in Lightning just like we used to do in Classic.

Why the need for this hack?

Well, the merging of records works a bit in Lightning than Classic. In Lighnting, the merging of records is based on duplicacy. So if two records are duplicate(according to ‘Potential Duplicates’ LEX component), then you will be able to merge them using Potential Duplicates component. In classic, this is not the case and you can merge two records even if they do not qualify as duplicates. To know more, refer this links:

Merge Accounts:
Merge Contacts:

Having understood the difference, let’s see how we can use the Classic merge functionality in Lightning.


The solution to our problem is URL hack. The idea is to create 2 buttons, one for Contacts & one for Accounts.

Let’s roll!

For Account merge: Create a custom URL button of List type with the following URL:


Now add this button to the List View (Setup -> Object Manager -> Account -> Search Layout -> List View).

For Contact Merge: Create a custom URL button of List type with the following URL:


Now add this button to the Contact related list on Account Page layout.

How it looks!

Small catch!

While merging contacts, the Contact related list component doesn’t get refreshed. So the user will have to manually refresh the page.

Thank you for being an awesome reader! Subscribe to this blog for receiving all the latest updates straight to your inbox. 🙂

7 thoughts on “Merge Accounts and Contact in Lightning like Classic

  1. This is great thank you! Is there a way to hide the button from non admins without creating a VF page? They don’t have rights to merge but it would be better if they cannot see the button at all. Thanks


    • That’s a really good point. Right now what I can think is maybe using custom permissions you can conditionally redirect user to some url. Am not sure if we can access custom permissions in URL formulae, but worth a try.


  2. I had that thought, too, but then realized if I look the All Account list view, the new button is visible only in the drop-down menu next to the three buttons I’ve got visible on that page layout; if I look at the Recently Viewed list view, it’s not visible. Maybe this is just some chance outcome of the way I installed it, but it’s pretty great because largely hidden.


  3. This is great. I just added it to my search layout, but now I am wanting to edit the columns visible in the search view (existing ones aren’t very useful). Looks like SF hasn’t given end users the ability to customize this, but curious if you have a clever hack for displaying more/different fields when searching for Accounts to merge.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.