Ask Search:
Maria BujoldMaria Bujold 

Preventing Users from Selecting certain Stage picklist values

Hello,

I'm trying to prevent all users, except two (who have two unique profile ID's) from placing an opportunity in Stage = PO Received - Finance Review.  

This is the formula I built and it is not working, neither of these folks can place an oppty in the PO Recieved stage successfully:  AND( ISPICKVAL( StageName , "PO Received - Finance Review") ,NOT( $User.ProfileId = "00e80000000skC9")) || AND( ISPICKVAL( StageName , "PO Received - Finance Review") ,NOT( $User.ProfileId = "00e80000001SSdG"))

Any help??

Aiden MartinAiden Martin
Try this.

AND(
ISPICKVAL( StageName , "PO Received - Finance Review") ,
$User.ProfileId <> "00e80000000skC9",
$User.ProfileId <> "00e80000001SSdG"
)

Aiden
Maria BujoldMaria Bujold
Hello Aiden,

That formula you provided did not work.  The users who should be able to select the stage = PO Received - Finance Review" can't.  Is there something we can tweak on the formula??
Aiden MartinAiden Martin
Hi Maria,

I've tested the formula and it works for me.  Is it possible that you miskeyed stagename or the profile id's?  Test the formula with only one profile id.  If it works, test with only the second profile id. 


Aiden
Maria BujoldMaria Bujold
Hello Aiden,

I tested the formula only for the profile ending in "...skC9" (which happens to be my profile ID) and it does not work.  When I place an opportunity in the PO Received - Finance Review stage, it gives me the error message indicated on the validation rule.  So, it appears the rule is running, only it should be allowing me to place an oppty in that stage; not disallowing me.  
 
Anything we can update to make this work??

Aiden MartinAiden Martin
If this doesn't work:

AND(
ISPICKVAL( StageName , "PO Received - Finance Review") ,
$User.ProfileId <> "00e80000000skC9"
)

What happens when you replace  " <>" with  " = " and try the following?

AND(
ISPICKVAL( StageName , "PO Received - Finance Review") ,
$User.ProfileId = "00e80000000skC9"
)

Maria BujoldMaria Bujold
Hey Aiden,

For some reason, this still isn't working.  So strange, its almost identical to another validation rule I built, but this one doesn't seem to want to work.  Any other thoughts on this one??
Aiden MartinAiden Martin
Sorry Maria,  I don't understand why the formula isn't working.  Have you double checked the Profile id?  (it happens)

AND(
ISPICKVAL( StageName , "PO Received - Finance Review") ,
$User.ProfileId <> "00e80000000skC9"
)