Pages

Monday, April 25, 2016

Salesforce: Not allow Opportunity back to the previous Stage


Use Case: biz team decide to set a rule that Opportunity Stage are not allowed back to the previous Stage and team decide not to add number in the Stage as prefix.

Solution: create a validation rule with hard code each stage with a number, but the number only valid for the validation rule.

Let's say this is our Stage for open Opportunity from beginning till before closed.
  • Prospecting
  • Qualification
  • Needs Analysis
  • Value Proposition
  • Id. Decision Makers
  • Perception Analysis
  • Proposal/Price Quote
  • Negotiation/Review

Validation rule:

 CASE   
 (   
      StageName ,   
           "Prospecting", 1,   
           "Qualification", 2,   
           "Needs Analysis", 3,   
           "Value Proposition", 4,   
           "Id. Decision Makers", 5,   
           "Perception Analysis", 6,       
           "Proposal/Price Quote", 7,   
           "Negotiation/Review", 8,   
           0   
 )   
 <   
 CASE   
 (   
      PRIORVALUE(StageName) ,   
           "Prospecting", 1,   
           "Qualification", 2,   
           "Needs Analysis", 3,   
           "Value Proposition", 4,   
           "Id. Decision Makers", 5,   
           "Perception Analysis", 6,       
           "Proposal/Price Quote", 7,   
           "Negotiation/Review", 8,   
           0   
 )  



No comments:

Post a Comment

Page-level ad