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
Laura BrewerLaura Brewer 

Using Validation for Conditional Requirement

New to Validation Rules! Need some help....  I want to create a conditional requirement on a field using Validation.  When Account "Type" Contains "Customer", the "Parent Account" field becomes required.  I'm struggling with the CONTAINS function.  Can anyone help?
Best Answer chosen by Laura Brewer
Venkat PolisettiVenkat Polisetti
See the attached image.

User-added image

All Answers

John PipkinJohn Pipkin
Laura, 

In order to use "Contains" function with a picklist field, you'll have to convert it to a text first. Like so:

CONTAINS(TEXT(Type),'Customer')
@anilbathula@@anilbathula@
Hi Laura,

Try this validation rule :-

CONTAINS(text(Type),'Customer')&& ISBLANK(Parent.Name)

Thanks
Anil.B
Venkat PolisettiVenkat Polisetti
See the attached image.

User-added image
This was selected as the best answer