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
PrakkiPrakki 

how to Restrict user to not to enter pick list values as per check box (checked/ un- checked)

Dear All,

 

We had created a custom check box in the user object, as per the check box value ( checked/ Un checked),   

i would like to restrict the user to not to enter values in the pick list fields.

 

If the pick list value is checked then user can enter values to the pick list fields. If it is unchecked, then i should restrict him.

 

Any one can help me in this scenario.

 

Promt responses will highly appriciated.

 

Thank you

 

Regards,

Prakki 

Chris760Chris760

Create a validation rule on the object you want to restrict.  Otherwise if you want it to apply to a ton of stuff, just reduce their access for a custom profile that you make for all such users.

 

Validation rule would look something like: 

 

AND($User.Checkbox = FALSE,PRIORVALUE(TEXT(picklist field)) <> TEXT(picklist field))

AroraAnupAroraAnup

Validation rules is one way to do it. However, if both the fields (checkbox as well as picklist) are custom, you may even explore Field Dependencies where the Checkbox can be the controlling field and picklist will be the dependent.

Worth exploring if it helps preventing you from writing a validation formula :)

 

Hope this helps!

AroraAnupAroraAnup

One more comment. If its a picklist, you would need to use ISPICKVAL with the picklist. TEXT won't work...