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
HNT_NeoHNT_Neo 

Validation Rule to stop users from saving a checkbox

I have a checkbox, donotsend__c, that if checked and saved, the user will be prompted with an error in not having sufficient access to do so. 

The checkbox must not be able to be saved to true. 

Can someone help me with this validation rule? 

Thanks!
Best Answer chosen by HNT_Neo
Tarun J.Tarun J.
Hello,

You can simply put this field in validation Error Condition Formula section. Validation Rule will trigger error message only when cirteria mentioned under 'Error Condition Formula' returns TRUE. In your case, you want to show error message when donotsend__c field is set to TRUE. So, you can create Validation Rule as below:

User-added image

Another way is to update the Error Condition Formula as: IF(donotsend__c , true, false) 

Both will work.

-Thanks,
TK

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.

All Answers

Tarun J.Tarun J.
Hello,

You can simply put this field in validation Error Condition Formula section. Validation Rule will trigger error message only when cirteria mentioned under 'Error Condition Formula' returns TRUE. In your case, you want to show error message when donotsend__c field is set to TRUE. So, you can create Validation Rule as below:

User-added image

Another way is to update the Error Condition Formula as: IF(donotsend__c , true, false) 

Both will work.

-Thanks,
TK

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
This was selected as the best answer
HNT_NeoHNT_Neo
Thank you Tarun. The 2nd option worked best!