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
cgillinghamcgillingham 

Picklist values can only be selected by certain user profile

Look at my stage picklist values below.  I only want a sales user profile to be able to choose the first two values.  Our order administration team should be the only profile able to choose 3. Confirmed Deposit.

 

Any way I can do this with a validation rule?

 

Stage

1. Interested

2. Pending

3. Confirmed Deposit

Best Answer chosen by Admin (Salesforce Developers) 
Steve :-/Steve :-/

I'm not sure why you would want users to be able to see options in a Picklist that they are unable to select (wouldn't that just confuse them?).

 

Anyway, here's the code to do what you're looking for:

 

 

AND(

NOT(

OR (

ISPICKVAL( StageName , "Interested"),

ISPICKVAL(StageName, "Pending"))),

$Profile.Name = "Sales User")

 

 

 

 

Message Edited by Stevemo on 12-30-2009 02:44 PM

All Answers

Steve :-/Steve :-/

You can do this using Record Types and Profiles, that way you can limit the Opportunity Stage picklist to only include that choices you want for that particular Profile.  

 

However, if you're Hell Bent on doing it with a Validation Formula (which I advise against) here's the formula you would use.  

 

 

AND (NOT( OR ( ISPICKVAL( StageName , "Interested"), ISPICKVAL(StageName, "Pending"))),$Profile.Name = "Sales User")

 

 

 

 

Message Edited by Stevemo on 12-30-2009 02:39 PM
cgillinghamcgillingham

I'd like for all users to be able to see the picklist values, but be given an error message when they are not the user who is supposed to update the stage to the paticular value. 

 

Correct me if I'm wrong, but I believe that using record types and profiles will only display certain stage picklist values, hiding others.

Steve :-/Steve :-/

I'm not sure why you would want users to be able to see options in a Picklist that they are unable to select (wouldn't that just confuse them?).

 

Anyway, here's the code to do what you're looking for:

 

 

AND(

NOT(

OR (

ISPICKVAL( StageName , "Interested"),

ISPICKVAL(StageName, "Pending"))),

$Profile.Name = "Sales User")

 

 

 

 

Message Edited by Stevemo on 12-30-2009 02:44 PM
This was selected as the best answer