function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
fsiddiq3fsiddiq3 

Create a validation rule for duplicate records

I have created a workflow that merges 2 fields in an object in a seperate field. So for example I have a field that is called Full name that merges First name and last name. What I want to do is to create a workflow that says if the value in Full name already exists, do not let the user save. Any suggestions?

MarkSilberMarkSilber

A validation rule can't look at multiple records, only the record you are trying to save. You would have to use a before insert / before update trigger or other add-on AppExchange app to prevent duplicates.

 

Also, workflows fire after validation rules and won't display error messages since they are behind the scenes.

JakesterJakester

How about using the recently released free tool from Salesforce for this?

http://sites.force.com/appexchange/apex/listingDetail?listingId=a0N300000016d1OEAQ

 

Rahul Kumar DeyRahul Kumar Dey
Hi guys I have a requirement that, I have three object A,B,C ---> A object has two lookup field B & C ---> Now my trigger is cloning the value of A,C to B ---> as well as clone the value of A,B to C its fine upto now ---> So B & C are now sync ---> now requirement is how to restrict user to select duplicate record both in B & C which is actually present in A. Any validation rule suggestion guys really appreciate.

Thanks,
Rahul