Ask Search:
Norm LoweNorm Lowe 

Validation rule

I'm looking for a validation rule where the rule fires under the following circumstances:

The opportunity record is new OR opportunity is marked closed/won

AND

Picklist field is blank AND a second picklist field is a certain value.

I have the following in place, but it's not working correctly.

OR(
ISNEW(),
IsWon = TRUE,

AND
(ISPICKVAL(Inbound_vs_Outbound_Opportunity__c, "" ),
ISPICKVAL( Type,"New Business" )
))
Best Answer chosen by Norm Lowe
Steve MolisSteve Molis
You don't want to use IsWon = TRUE in a Validation Rule, use the Stage Name like this 
AND(
ISBLANK(TEXT(Inbound_vs_Outbound_Opportunity__c)),
TEXT( Type ) = "New Business",
OR(
ISNEW(),
TEXT(StageName) = "Closed Won"
)
)

 

All Answers

Steve MolisSteve Molis
You don't want to use IsWon = TRUE in a Validation Rule, use the Stage Name like this 
AND(
ISBLANK(TEXT(Inbound_vs_Outbound_Opportunity__c)),
TEXT( Type ) = "New Business",
OR(
ISNEW(),
TEXT(StageName) = "Closed Won"
)
)

 
This was selected as the best answer
Tony TrinhTony Trinh
Hello Norm,

Give this a try:
AND(
  OR(
    ISNEW(),
    TEXT(StageName) = "Closed Won"
  ),
  ISBLANK(TEXT(Inbound_vs_Outbound_Opportunity__c)),
  ISPICKVAL(Type, "New Business")
)