Skip to main content

Is someone able to help me build a validation rule for the following?

I tried using this formula but I don't understand how to apply it to the business use case below

 

AND(RecordType.Name="XXX",CASE(StageName,"Stage1",1,"Stage2",2,"Stage3",3,"Stage4",4,0)<CASE(PRIORVALUE(StageName),"Stage1",1,"Stage2",2,"Stage3",3,"Stage4",4,0))

User story: As a sales rep, when I move an opportunity to P2, I should be able to move it back to P1, but once it hits P2, I should never be able to get it back to P0 (even if I go back to P1).

Details: Reps are taking advantage of P0s, by hiding losses by moving them back to P0. Once an opp hits P2, that opp should not be able to ever be marked as a P0 again.

 

DoD: Once an opp hits P2, it can go back to P1, but can never go back to P0. Meaning, it also cannot be moved from P2 > P1 > P0.

12 answers
0/9000