There will be times, we all need to avoid creating duplicate records in Salesforce. And here, I will explain how to avoid creating duplicate records in Salesforce. We will also discuss, how to stop creating duplicate records in Salesforce.
Recently, I was working in Salesforce, where we got a requirement to avoid creating duplicate records in Salesforce. So, in this blog, I will also explain, how to avoid creating duplicate records in Salesforce.
So, we will cover these topics in this Salesforce tutorial.
- How to avoid creating duplicate records in Salesforce
- How to avoid creating duplicate records in Salesforce lightning
- How to avoid creating duplicate records in Salesforce Classic
- How to stop creating duplicate records in Salesforce
- How to terminate creating duplicate records in Salesforce
How to avoid creating duplicate records in Salesforce
Records are collections of fields and data items of different data types, in a fixed number or series. The fields of a record might also call members.
The duplicate records in salesforce are the blueprints of another record, some records might be different due to duplicate information being present.
In this section, we have explained how to avoid creating duplicate records in salesforce with the help of an example.
A Huel Ltd is establishing a new branch in California, USA and this company got a requirement of an employee who helps in avoid creating duplicate records in Salesforce.
Now, let’s move ahead and see how to avoid creating duplicate records in Salesforce. We will explore both the salesforce experiences: Salesforce lightning and Salesforce Classic.
How to avoid creating duplicate records in Salesforce lightning
Salesforce Lightning is a modern view of the salesforce platform that is fast, easy, and filled with a wide variety of options.
Here we avoid creating duplicate records in salesforce by simply using the duplicate rule and matching rule.
Follow the below steps on How to avoid creating duplicate records in salesforce lightning:-
Step-1: Login to the salesforce account, go to setup, and then search Duplicate rule from Quick Find Box.

Step-2: Click on the Duplicate rule, All duplicate Rules page is open then click on the New Rule option and select the object you want. Here we are selecting the Developer USA object.

Step-3: After clicking on the New Rule option, The Developer USA page is open. Now edit the duplicate rule, fill in the rule details the rule name is the Developer USA Duplicate rule then fill in the description.
After that Check the record level security, here we are choosing the Bypass Sharing rules and then specify what happens when a user tries to save a duplicate record.
Action On Create, click on the drop-down arrow and choose the block option and same as Action on Edit this will help in avoiding duplicate records.

Step-4: After filling in the detail of the duplicate rule, now creating the matching rule. Under the Matching rule select the create new matching rule option.

Step-5:Â After clicking on create new matching rule option, the Matching Rule page is open. Under the matching rule fill in the rule details.
Firstly fill in the rule name which is the Developer USA Duplicate rule after that fill in the Unique name and then match the criteria and after that click on save.

Step-6: After clicking on the save option. The Developer USA Duplicate rule matching rule is created. Now activate this matching rule by simply clicking on the activate option.

Step-7: After activating the matching rule, Now again click on the duplicate rules.

Step-8: Again clicking on the duplicate rule, you can see that the Developer USA Duplicate rule is created now activate the rule by simply clicking on the activate option.

Step-9: After activating the duplicate rule, Search sales in the app launcher then click on the Developer USA object that is present in the nav bar.

Step-10: After clicking the object, the Developer USA object page is open. Click on the New option.

Step-11: After clicking on the New option the information field is open. Fill in the complete information. After filling in the information, click on the save option.

Step-12: If the information is duplicated, after clicking on the save button the warning message is pop up on the screen and the duplicate records are not saved.

So, with this, we have understood how to avoid creating duplicate records in salesforce lightning.
Read How to create duplicate rule and matching rule in salesforce
How to avoid creating duplicate records in Salesforce Classic
Salesforce classic is the traditional user experience of salesforce and before the salesforce lightning was introduced, it was the only salesforce experience.
Follow the below steps on How to avoid creating duplicate records in salesforce classic:-
Step-1: Login to the salesforce account, go to setup, and then search Duplicate rule from Quick Find Box.

Step-2: Click on the Duplicate rule, All duplicate Rules page is open then click on the New Rule option and select the object you want.

Step-3: After clicking on the New Rule option, The USA Task Project page is open. Now edit the duplicate rule, fill in the rule details the rule name is the USA Task Project Duplicate rule then fill in the description.
After that Check the record level security, here we are choosing the Bypass Sharing rules and then specify what happens when a user tries to save a duplicate record.
Action On Create, click on the drop-down arrow and choose the block option and same as Action on Edit this will help in avoiding duplicate records.

Step-4: After filling in the detail of the duplicate rule, now creating the matching rule. Under the Matching rule select the create new matching rule option.

Step-5: After clicking on create new matching rule option, the Matching Rule page is open. Under the matching rule fill in the rule details.
Firstly fill in the rule name which is the USA Task Project Duplicate rule after that fill in the Unique name and then match the criteria and after that click on save.

Step-6: After clicking on the save option. The USA Task project Duplicate rule matching rule is created. Now activate this matching rule by simply clicking on the activate option.

Step-7: After activating the matching rule, Now again click on the duplicate rules.

Step-8: Again clicking on the duplicate rule, you can see that the USA Task project Duplicate rule is created now activate the rule by simply clicking on the activate option.

Step-9: After activating the duplicate rule, then click on the USA Task Project object that is present in the nav bar. After clicking the object, the Developer USA object page is open. Click on the New option.

Step-10: After clicking on the New option the information field is open. Fill in the complete information. After filling in the information, click on the save option.

Step-11: If the information is duplicated, after clicking on the save button the warning message is pop up on the screen and the duplicate records are not saved.

This is how we understand how to avoid creating duplicate records in salesforce classic.
Read How to Create Report on Duplicate Records in Salesforce
How to stop creating duplicate records in Salesforce
To stop creating duplicate reports in salesforce, select the block option of Action on creating instead allow option and select bypass sharing rule of record level security instead of enforcing sharing rule this will help us avoid creating duplicate records.
Follow the below steps on How to stop creating duplicate records in salesforce:-
Step-1: Login to the salesforce account, go to setup, and then search Duplicate rule from Quick Find Box.

Step-2: Click on the Duplicate rule, All duplicate Rules page is open then click on the New Rule option and select the object you want.

Step-3: After clicking on the New Rule option, The Expense page is open. Now edit the duplicate rule, fill in the rule details the rule name is the Furniture Expense USA then fill the description.
After that Check the record level security, here we are choosing the Bypass Sharing rules and then specify what happens when a user tries to save a duplicate record.
Action On Create, click on the drop-down arrow and choose the block option and same as Action on Edit this will help in avoiding duplicate records.

Step-4: After filling in the detail of the duplicate rule, now creating the matching rule. Under the Matching rule select the create new matching rule option.

Step-5: After clicking on create new matching rule option, the Matching Rule page is open. Under the matching rule fill in the rule details.
Firstly fill in the rule name which is the Furniture Expense USA after that fill in the Unique name and then match the criteria and after that click on save.

Step-6: After clicking on the save option. The Furniture Expense USA matching rule is created. Now activate this matching rule by simply clicking on the activate option.

Step-7: After activating the matching rule, Now again click on the duplicate rules.

Step-8: Again clicking on the duplicate rule, you can see that the Furniture Expense USA Duplicate rule is created now activate the rule by simply clicking on the activate option.

So, with this, we understand how to stop creating duplicate records in Salesforce.
Read How to find duplicate records in Salesforce
How to terminate creating duplicate records in Salesforce
Selecting the block option of Action on create instead allows the option to terminate creating records in salesforce.
Follow the below steps on How to terminate creating duplicate records in salesforce:-
Step-1: Login to the salesforce account, go to setup, and then search Duplicate rule from Quick Find Box.

Step-2: Click on the Duplicate rule, All duplicate Rules page is open then click on the New Rule option and select the object you want.

Step-3: After clicking on the New Rule option, The US offer page is open. Now edit the duplicate rule, fill in the rule details the rule name is the Schultz-Wehner then fill the description.
After that Check the record level security, here we are choosing the Bypass Sharing rules and then specify what happens when a user tries to save a duplicate record.
Action On Create, click on the drop-down arrow and choose the block option and same as Action on Edit this will help in avoiding duplicate records.

Step-4: After filling in the detail of the duplicate rule, now creating the matching rule. Under the Matching rule select the create new matching rule option.

Step-5: After clicking on create new matching rule option, the Matching Rule page is open. Under the matching rule fill in the rule details.
Firstly fill in the rule name which is the Schultz-Wehnew after that fill in the Unique name and then match the criteria and after that click on save.

Step-6: After clicking on the save option. The Schultz-Wehner matching rule is created. Now activate this matching rule by simply clicking on the activate option.

Step-7: After activating the matching rule, Now again click on the duplicate rules.

Step-8: Again clicking on the duplicate rule, you can see that the US offer Duplicate rule is created now activate the rule by simply clicking on the activate option.

So, with this, we understand how to terminate creating duplicate records in Salesforce.
Conclusion
In this tutorial, we have learned how to avoid creating duplicate records in salesforce, and also we have covered how to stop creating Duplicate records in salesforce. This can be performed on both salesforce lightning and salesforce classic.
- How to avoid creating duplicate records in Salesforce
- How to avoid creating duplicate records in Salesforce lightning
- How to avoid creating duplicate records in Salesforce Classic
- How to stop creating duplicate records in Salesforce
- How to terminate creating duplicate records in Salesforce
You may like the following salesforce tutorials:
- How to Create Workflow Rule in Salesforce
- How to Duplicate a Report in Salesforce
- Create a Junction Object in Salesforce
- How to Use Chatter in Salesforce
- How to Create a Task in Salesforce
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.