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
KSKKSK 

Boolean to influence Stage behaviour

I'm trying to generate a Val rule which prevents a Stage from being selected. When the 'source' (or influencing field) is a picklist, text, or date field I have no issues, but I cant find the function that controls how a Boolean (particularly, if Null) controls/limits the Stage...

 

Input most welcome!

 

KSK  

Best Answer chosen by Admin (Salesforce Developers) 
JakesterJakester

Hi KSK,

 

In Salesforce, booleans can't be null. You work with them by just referencing them, so for example if you wanted to not allow the stage to be X when the boolean checkbox named bool__c was checked, then the code would be:

 

 

and( ispickval(Stage,"X") ,bool__c )

 

 

 

 

All Answers

JakesterJakester

Hi KSK,

 

In Salesforce, booleans can't be null. You work with them by just referencing them, so for example if you wanted to not allow the stage to be X when the boolean checkbox named bool__c was checked, then the code would be:

 

 

and( ispickval(Stage,"X") ,bool__c )

 

 

 

 

This was selected as the best answer
KSKKSK

Thanks, dude. That did the trick with NOT(Bool)...

 

KSK