Salesforce- Limitize PickList Value Modification to Certain Profiles

by - 2:37 PM

Scenerio -  Given certain profile, if user do not belong to certain profile, he/she must not be able modify the a custom picklist value Status = Modified and Pending 

Solution -  Grab the profile id - for those profile which are allowed to modify the picklist values
                  Make a check if profile id is exactly the same as required, allow the change else throw error

How to Find Profile Id :

Here are the quick steps to find the profile id of the User

1. Navigate to - Left Bar Navigation Users

On the top bar (url bar/omni bar) notice the profile id is appended on the back of the url as shown below and highlighted in the pic attached

Validation Rule :

Error Condition Formula -

NOT($Profile.Id = "00e3er34343hITf" || $Profile.Id ="023232323e" &&( ISPICKVAL(Status, "Modified")|| ISPICKVAL(Status, "Pending ")|| ISPICKVAL(Status, "Qualified"))

Error Message - 'Invalid field for this profile'

This clearly restricts/limits the modification  and make picklist only accessible to certain allowed profile

You May Also Like