I want to prevent duplicate records of an object in Salesforce. I know how to do it by writing a trigger,but some one told me it can be possible by validation rule also. Can anyone help me how to avoid duplicate records using validation rule ?


2 Answers 2


Salesforce implemented new functionality to spot the duplicate, using Matching rules and Duplicate rules.

You don't have to replicate the functionality with custom workflow rules, unique fields, triggers etc. Plus it has the ability to do fuzzy matching as well as exact matching.


You can also do it with a unique field and workflow rule ( field update ).

Not the answer you're looking for? Browse other questions tagged .