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

Restricting 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





Yoganand GadekarYoganand Gadekar

You can do this using simple validation rule on user object. For picklist you will have to use function ISPICKVAL,


ISPICKVAL(picklist_field, text_literal) Checks whether the value of a picklist field is equal to a string literal


Mark this as answer and hit kudos if it helps you.

Hi Yoganand,

Thx for the answer, let me explain u clearly regarding the scenario.

Actually the check box field is in user object as per the value of the check box, i should give crud permission.

In single line as per the value in the check box, selected fields should changed to read only.

Yoganand GadekarYoganand Gadekar

From what i understood from your requirement:

Say you have checkbox named "MyCheckbox' on user object.

your other field is picklist filed named "MyPickList" having values say (One , two,Three and Four)


And you want that if you check the "MyCheckbox' then allow picklist values as say (One, and Two)

And if checkbox is unchecked then allow picklist value say (Three and four)

Is that your requireemnt?


If it is, then you can use field dependency.

Go to setup--> cutomize --> user --> fields --> in custom fields click on "field dependency" button and create your new field dependency. Select controlling filed as your checkbox field and dependent field as picklist field.

And define you picklist values for checked and unchecked values of checkbox.


Hope this helps.


Marks this as answer and hit kudos if it helps you.




No Yoganand,

If mycheckbox in the user object is un checked then, user can't able to enter the new values to the pick list ( my picklist). What i means is mypicklist contains values (one,two,three,four) user should not enter another value five.

How can i achieve this..??
Yoganand GadekarYoganand Gadekar

Do you mean you want to control the New picklist value options at field level? or at record level?


If it is at record level then you can do it using validation rule(if you have less number of picklist values) or trigger validation if you have many picklist values.


If you are looking for restricting values being added at field level then i doubt this can be controlled using another field.


Hit kudos and mark this as answer if it helps you.


thanks and regards,


I want to restrict from field level...