+ Start a Discussion
msglsmomsglsmo 

Validation Rules requiring two fields to match, if another field is blank

Good Morning, All,

 

It is my first day back from vacation, but apparently my Salesforce knowledge is apparently still on vacation.

 

I am trying to create a simple (I thought) validation rule that require the standard "Name" field and the custom field "Corporate Name" match exactly, but only if the standard field "Parent Account Name" is blank.

 

I came up with:

 

 

AND(
ISNULL( Parent.Name),
(Name <> Corporate_Name__c ))

 

 

That did not work.


What am I missing?

 

Thanks in advance!

 

 

Best Answer chosen by Admin (Salesforce Developers) 
SteveMo__cSteveMo__c

 

AND( 
LEN(ParentId) < 1, 
(Name <> Corporate_Name__c ))

or if you're not into the whole brevity thing man...

 

 

AND(
ISBLANK( Parent.Name),
(Name <> Corporate_Name__c ))

 

 

All Answers

SteveMo__cSteveMo__c

 

AND( 
LEN(ParentId) < 1, 
(Name <> Corporate_Name__c ))

or if you're not into the whole brevity thing man...

 

 

AND(
ISBLANK( Parent.Name),
(Name <> Corporate_Name__c ))

 

 

This was selected as the best answer
msglsmomsglsmo

Thank you, thank you, thank you!!!

 

Worked like a charm!

SteveMo__cSteveMo__c

The Dude abides...