+ Start a Discussion
Ed055Ed055 

validation rule help

Hi all ,

I need help writing validation rule on opportunity. I have a field called "Revenue" . I want to make this field mandatory if stage name = "OPEN"  or stage name ="LOST" 

Thanks.
Best Answer chosen by Ed055
RamuRamu (Salesforce Developers) 
This should work

AND(OR( ISPICKVAL(StageName,"Open"), ISPICKVAL(StageName,"Lost")),ISBLANK(Revenue__c))

All Answers

Balaji BondarBalaji Bondar
Hi Ed005,

Use below formula and replace Field API  as required:
AND(
  OR(stage name = "OPEN" , stage name ="LOST" ),
  Revenue = Null
)
Important :
If this is what you were looking for then please mark it as a "SOLUTION" or You can Click on the "Like" Button if this was beneficial for you.
RamuRamu (Salesforce Developers) 
This should work

AND(OR( ISPICKVAL(StageName,"Open"), ISPICKVAL(StageName,"Lost")),ISBLANK(Revenue__c))
This was selected as the best answer
pconpcon
The following validation rule should do what you're looking for.  You will need to make sure that Revenue__c is replaced with your fields name as well as the actual value in the picklist is "OPEN" or "LOST"
 
AND(ISBLANK(Revenue__c), OR( ISPICKVAL(StageName, "OPEN"), ISPICKVAL(StageName, "LOST")))