Skip to main content

I am trying to Restrict Opportunity Stage pick-list value based on Profile... My code as below

AND( 

 

$Profile.Name <> "System Administrator", 

 

$Profile.Name <> "Sales Manager", 

 

$Profile.Name <> "Standard User", 

 

ISCHANGED(StageName), 

 

TEXT(StageName) = "Closed Lost")

When i login as Standard User, i am still able to see the Closed Lost option in the picklist. Can any one suggest.

10 answers
  1. Aug 10, 2016, 1:06 PM
    the reason why you are not getting the error is because you have excluded the Standard User profile from your validation rule.

     

    $Profile.Name <> "Standard User"

     

    As per your validation rule 3 profiles System Administrator, Sales Manager and Standard User are excluded from Validation rule.

     

    Login as any other user who does not belong to any of the 3 profiles and test the VR.

     

    If you want the Standard Users to receive the error when they set the Stage to Closed Lost, modify the formula to the below

    AND(

    $Profile.Name <> "System Administrator",

    $Profile.Name <> "Sales Manager",

    ISCHANGED(StageName),

    TEXT(StageName) = "Closed Lost"

    )

0/9000