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
Rick RossiRick Rossi 

Validation Rule TEXT question


Hello!
 
I need a validation that should not be on the creation of a lead but only on the edit on the lead. If my text field (reason why) is populated, then picklist A and Picklist B cannot be blank.
 
Any help would be great!
 
Thanx!
VinayVinay (Salesforce Developers) 
Hi Rick,

Try below snippet.
 
AND(NOT(ISBLANK(text field)), NOT(ISNEW()),OR(ISBLANK(ISPICKVAL(Picklist A,'a')),ISBLANK(ISPICKVAL(Picklist B,'b'))))

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Rick RossiRick Rossi
Hello,

I adjusted the code however I wouldn't want it on creating only on an edit of the lead. This is what I currently have. It is working but on both the create and edit of the lead. Should only be on edit:

AND(
NOT(ISBLANK( ID )),
OR(
ISBLANK(TEXT( Picklist A)),
ISBLANK(TEXT( Picklist B)
)
)
)