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
kiransure kumarkiransure kumar 

HOW CAN I VALIDATE CHECK BOX FIELDS

HI THERE I HAVE TO CHECK BOX OPTIONS ONE IS BY DEFAULT CHECKED ONE .NOW I WANT VALIDATE THAT FIELDS .MY INTENTION IS DO NOT SELECT BOTH FIELDS AT A TIME .IF ANY ONE SELECT MY VALIDATION RULE IS GOING SHOW ERROR MESG .CAN ANY ONE TELL ME HOW TO DO IT .?
Best Answer chosen by kiransure kumar
ManojjenaManojjena
Hi KiranSure ,

You need to write the validation rule like below .
 
AND(First_CheckBox_API==True, Second_CheckBox_API ==True)

Add error message as you expected . 

All Answers

PratikPratik (Salesforce Developers) 
Hi kiransure,

In your validation rule put conditions:
 checkboxfields__c = True (checkbox checked) 
checkboxfields__c = False (checkbox unchecked)

Thanks,
Pratik

 
ManojjenaManojjena
Hi KiranSure ,

You need to write the validation rule like below .
 
AND(First_CheckBox_API==True, Second_CheckBox_API ==True)

Add error message as you expected . 
This was selected as the best answer
kiransure kumarkiransure kumar
THANK U MANOJ .AND PRATIK