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
Amit BishtAmit Bisht 

Need help with the IF condition so that It can be used for the Validation Rule.

Hi,
  The Situation is I do have two check boxes A & B. My condition is to allow any one of the check box to be true at a time. If A is true B should be false and Vice versa. I am new to Salesforce and don't know how to use the Functions.

Thank you.
 
Best Answer chosen by Amit Bisht
Jayson Faderanga 14Jayson Faderanga 14
When you say validation rule, meaning you don't want any user to save a record if both of the checkboxes is true, it should be only one of the checkboxes. You can use this below syntax in your validation rule, you don't need to use the IF function.

checkbox_A__c = true && checkbox_b__c = true