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
Justin PRJustin PR 

Help: Validation Rule on Checkbox Field?

I am looking to make a validation rule so that a checkbox field can be checked by anyone, however it cannot be unchecked except by an admin user.

 

I'm familiar with validation rules and forumlas, just having a hard time getting my head around this.  Any ideas?

Best Answer chosen by Admin (Salesforce Developers) 
deepzdeepz

Hi Justin,

 

Please try the below validation

 

AND(
       AND(
                 ISCHANGED(checkbox_field) , 
                 NOT(checkbox_field)

             ) ,
      NOT($Profile.Name = "system Admin")
    )

All Answers

neerureddyneerureddy

Hi Justin,

 

Make checkbox field ready-only at field level security to each and everyprofile except Administrator. Hope I answered your question.

 

Thanks,

Neeru.

 

 

deepzdeepz

Hi Justin,

 

Please try the below validation

 

AND(
       AND(
                 ISCHANGED(checkbox_field) , 
                 NOT(checkbox_field)

             ) ,
      NOT($Profile.Name = "system Admin")
    )

This was selected as the best answer
deepzdeepz
Oops!! sorry abt the emoticons.. replace them with brackets
Justin PRJustin PR
Thank you - that worked!
neerureddyneerureddy

Yeah Really nice job. Tat worked.

 

Thanks,

Neeru.