Skip to main content

I wanted to write a validation rule on Opportunity such that two profiles let say Global Elite User(ABC) and GLobal Finance User(EFG) should be able to change the Opportunity Stage (Picklist) if it is in the WON stage to LOST, CANCELLED, or IMPACT or IDEA or WIP, and IF Stage is equal to LOST, CANCELLED or IMPACT No One should be able to change the record. Another condition is if Stage is equal to IDEA or WIP a Global Sales Profile(QWE) as well as Global Elite User(ABC) and GLobal Finance User(EFG) should be able to change it to the WON stage but once it is in the WON stage Global Sales Profile should not be able to change it back to IDEA or WIP but Global Elite User(ABC) and GLobal Finance User(EFG) should be. @Steve Molis @Eric Praud  @Eric Schubert

3 Antworten
  1. 22. Juli 2022, 17:31

    @Pradhumna Patel - I would do this with a few Validation Rules. Good Luck!

     

    Rule 1: Will only allow the ABC and EFG Profiles to move an Opportunity from Closed Won to one of the other values.

     

    AND ( 

    $Profile.Name <> "ABC",

    $Profile.Name <> "EFG", 

    ISPICKVAL(PRIORVALUE(Stage),"Closed Won"),

    OR (

    ISPICKVAL(Stage, "Closed Lost"),

    ISPICKVAL(Stage, "Cancelled"),

    ISPICKVAL(Stage, "Impact")

    ))

     

    Rule 2: Once an Opportunity is in one of these Stages, you can't change the Stage to something else. Change the Field__c to whatever field(s) you want to prevent from changing. 

     

    AND (

    OR (

    ISPICKVAL(Stage, "Closed Lost"),

    ISPICKVAL(Stage, "Cancelled"),

    ISPICKVAL(Stage, "Impact")

    ),

    OR (

    ISCHANGED(Stage),

    ISCHANGED(Field__c)

    ))

     

    Rule 3: Will only allow the QWE Profile to move an Opportunity from IDEA or WIP to Closed Won.

     

    AND ( 

    $Profile.Name <> "QWE",

    OR (

    ISPICKVAL(PRIORVALUE(Stage),"IDEA"),

    ISPICKVAL(PRIORVALUE(Stage),"WIP")

    ),

    ISPICKVAL(Stage, "Closed Won")

    )

0/9000