How to Avoid Creating Duplicate records in Salesforce

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.

How to avoid creating duplicate records in salesforce
How to avoid creating duplicate records

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.

How to avoid creating duplicate records in salesforce
How to avoid creating duplicate records in salesforce

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.

salesforce avoid creating duplicate records
Block the action of creating 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.

avoid creating duplicate records salesforce
select create a new matching rule

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.

avoid creating duplicate records salesforce classic
Save the matching rule

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.

avoid creating duplicate records salesforce lightning
Activate the matching rule in salesforce

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

Again click on the duplicate rule

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.

Activate the duplicate rule in salesforce
Activate the duplicate rule in salesforce

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.

Salesforce avoid creating duplicate records
Click on the Developer USA object

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

Salesforce lightning avoid creating duplicate records
Click on the new button

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.

Avoid creating duplicate records in salesforce
save the New developer USA

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.

Salesforce avoid creating duplicate records
A warning message is come up

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.

How to avoid creating duplicate records in salesforce classic
How to avoid creating duplicate records in salesforce classic

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.

Salesforce classic avoid creating duplicate records
click on the new rule button

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.

Block the action on creating a duplicate records in salesforce
Block the action on creating duplicate records in salesforce

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.

Avoid creating duplicate records in salesforce classic
Select create a new matching rule in salesforce

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.

Do you know how to avoid creating duplicate records in salesforce
Save the USA Task project matching rule

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.

Salesforce classic avoid creating duplicate records
Activate the USA task project matching rule

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

Again select the duplicate rule in salesforce classic
Again select the duplicate rule in salesforce classic

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.

Do you know how to avoid creating duplicate records in salesforce classic
Activate the USA task project duplicate rule

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.

Salesforce avoid creating duplicate records
Click on a 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.

avoid creating duplicate records salesforce
Click on save new USA task project

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.

Avoid creating duplicate records salesforce classic
A warning message is pop up

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.

How to stop creating duplicate records in salesforce
How to stop creating duplicate records in salesforce

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.

How to stop creating duplicate records in salesforce lightning
How to stop creating duplicate records in salesforce lightning

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.

Stop creating duplicate records in salesforce
Create Expense Duplicate rule in salesforce

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.

Stop creating duplicate records in salesforce lightning
Create a new matching rule

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.

Salesforce stop creating duplicate records
Save the expense matching rule

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.

Activate the expense matching rule in salesforce
Activate the expense matching rule in salesforce

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

salesforce lightning stop creating duplicate records
Again select the expense duplicate rule

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.

Salesforce classic stop creating duplicate records
Activate expense duplicate rule

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.

How to terminate creating duplicate rule in salesforce
How to terminate creating a duplicate rule in salesforce

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.

How to terminate creating duplicate rule in salesforce lightning
How to terminate creating a duplicate rule in salesforce lightning

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.

Terminate creating duplicate records in salesforce
Create US offer duplicate rule

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.

Terminate creating duplicate records in salesforce lightning
Create a new US offer new matching rule

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.

Salesforce terminate creating duplicate records
Save US Offer matching rule

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.

Salesforce lightning creating duplicate records
Activate US offer matching rule

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

Terminate creating duplicate records salesforce
Again select a duplicate rule

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.

Terminate creating duplicate records salesforce lightning
Activate US offer duplicate rule

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: