Skip to main content
Bhavisha Vekaria 님이 #Data Management에 질문했습니다
Hi,

 

I am in the middle of expanding a current validation rule within the Stage field and Opportunity Status but getting no luck.

 

I have two fields, one called Stage and the other field is Opportunity Status.

 

What I am trying to do is add a validation rule that if in Stage number 5, 6 and 7 is selected then the user can only select from the Opportunity Status 'Closed Won' or 'Open' or 'Cancelled/No Sale' (they should not be able to select 'Closed Lost') and vice versa on the field Opportunity Status, i.e. Closed Lost can be selected if the selected attribute on Stage is between 1-4 only.

 

Stage has the following:

  • 1. Prospecting
  • 2. Planning
  • 3. Pitched
  • 4. Negiotiation
  • 5. Confirmed Agreement
  • 6. Sent To Finance
  • 7. Complete

 

Opportunity Status has the following:

  • Open
  • Closed Won
  • Closed Lost
  • Cancelled/No Sale

 

The current validation rule within the Stage field is as follows (credit to Steve Molis: https://success.salesforce.com/answers?id=9063A000000ii48)

 

AND( 

 

ISNEW(), 

 

CASE( StageName , 

 

"1. Prospecting", 1, 

 

"2. Planning", 2, 

 

"3. Pitched", 3, 

 

"4. Negotiation", 4, 

 

"5. Confirmed Agreement", 5, 

 

"6. Sent To Finance", 6, 

 

"7. Complete", 7, 

 

0) > 1 

 

)

 

With thanks in advance :)
답변 2개
  1. 2018년 5월 30일 오후 1:29
    Bhavisha,

     

    Assuming "Opportunity Status" is a picklist field, give this a try:

     

     

    AND(

    TEXT(Opportunity_Status__c) = "Closed Lost",

    CASE(StageName,

    "1. Prospecting", 1,

    "2. Planning", 2,

    "3. Pitched", 3,

    "4. Negotiation", 4,

    "5. Confirmed Agreement", 5,

    "6. Sent To Finance", 6,

    "7. Complete", 7,

    0) > 4

    )

     

     
0/9000