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
Anuj Mehra 17Anuj Mehra 17 

Validation Rules requiring two fields not to match

I have two fields in my org Name and Legal Name. We need to ensure both fields are not an exact match. Below is the Syntax I have put:

Name  <>  Legal_Name__c

Can anyone help me rectify it?
Best Answer chosen by Anuj Mehra 17
CharuDuttCharuDutt
Hii Anuj 
Try Below Validation
Name = Legal_Name__c
Please Mark It As Best Answer If It Helps
Thank You!

All Answers

CharuDuttCharuDutt
Hii Anuj 
Try Below Validation
Name = Legal_Name__c
Please Mark It As Best Answer If It Helps
Thank You!
This was selected as the best answer
Anuj Mehra 17Anuj Mehra 17
this looks like ensure names should match. I want to ensure the names are NOT an exact match. *Anuj Mehra * Salesforce Administrator E anuj.mehra@stuff.co.nz | *M *0224210040 Level 7/4 Williamson Avenue, Grey Lynn, Auckland 1021 [image: A close up of a logo Description automatically generated]
Suraj Tripathi 47Suraj Tripathi 47
Hi Anuj Mehra 17,
Please try the below syntax.

Name = Legal_Name__c

When the validation rule will match it will show the error message and ensure that both the fields should not be an exact match.


Please mark it as the best answer, if it helps.
Thanks.