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
Sonam PatilSonam Patil 

validation rule to prevent duplicate records

Hi,
I have Company as a custom object, and Company Name as a Salesforce Defined Field in that object.
Can anyone help me to write validation Rule to prevent the duplicate of Company Name

Thanks,
Varalaxmi
 
Rahul KumarRahul Kumar (Salesforce Developers) 
Hi Sonam Patil,

May I suggest You please refer the below link for reference on prevent duplicate records in Salesforce using validation Rule. Hope it will be helpful.

Please mark it as best answer if the information is informative.so that question is removed from an unanswered question and appear as a proper solution.

Thanks
Rahul Kumar
VICKY_SFDCVICKY_SFDC
PREVENT DUPLICATE RECORD NAME:

Create a custom field, mark it as Unique. Now write a workflow field update to update this custom field with concatenation of Contact's 15 or 18-digit Id and Name field.
This way you count on sales-force's native uniqueness validation to prevent dupes instead of coding it.

MARK IT AS BEST ANSWER.IF MY SOLUTION HELPS YOU