Overview:
The duplicate rule and matching rule are linked with each other.
What is Matching Rule?
A matching rule defines how duplicate records are identified in duplicate rules. Salesforce provides standard matching rules for business and person accounts, contacts, and leads. You can also create custom matching rules
What is Duplicate Rule?
A duplicate rule defines what happens when a user views a record with duplicates or starts creating a duplicate record. Salesforce provides standard duplicate rules for business and person accounts, contacts, and leads. You can also create duplicate rules. Now, let’s move on how to create this in salesforce,
Steps to create this:
- Go to Setup–>Duplicate Rule.
- There are a couple of duplicate rules for Lead, Account & Contact.
- To make the duplicate rule work the matching rules should be active.
- Below is the explanation of every option in the duplicate rule.
Explanation of each option:
- Rule Name: Name of the rules like we give for a custom field. We can change it if needed.
- Description: To identify the purpose of the rule.
- Object: The object which the duplicate rule should work.
- Record level security:Â We have 2 options.
- Enforce sharing rule – Check the duplicate on records which can read by the user.
- Bypass sharing rule – Check the duplicate on all records regardless of the user have access to the record or not.
- Action on create:Â We have 2 options
- Allow – This will show the error if you are creating the duplicate record if this checkbox is checked.
- Report – This will not show the error but it will create the records on Duplicate Error Log report
- Action on edit: This works same like Create but it will work on the edit of an existing record.
- Operation on Create: We have 2 options,
- Alert – If checked this will alert the user on create.
- Report – If checked this will create a duplicate record which we can use reports to identify it
- Operation on Edit: We have 2 options,
- Alert – If checked this will alert the user on create.
- Report – If checked this will create a duplicate record which we can use reports to identify it.
- Alert Text: Used to display the error message whenever a user creates a duplicate record.
- Active: This is used to identify if the rule is active or not.
- Matching Rule: This is used to identify how the records should match and find the duplicate. So, normally whenever a user creates a duplicate record it will show the error message like in the below screenshot.