+ Start a Discussion
Grace EdmistonGrace Edmiston 

Opportunity Validation Rule Error

Hi all, I am trying to write an opportunity validation rule that follows the following logic:
"If "date of 1st demo" field is NOT blank OR if TCV is not equal to $0.00, then Stage is D+ or higher."

I've accomplished writing the part of the rule that requires the stage to be D+ or higher if one of those two criteria are met. However, I am having trouble with the last part of the rule. I'd like to be able to take it back down to a stage below D+ if those criteria are no longer met. 

Here's the rule:

IF ((AND(ISPICKVAL(StageName,"D"), 
AND (( Date_of_1st_Demo__c > NULL ), 
OR ( Total_Contract_Value_LICENSE__c <> NULL), 
OR ( Total_Contract_Value_Subscription__c <> NULL)))), 

OR (ISPICKVAL(StageName,"D+"), ISPICKVAL(StageName,"C"), ISPICKVAL(StageName,"B"), ISPICKVAL(StageName,"A"), ISPICKVAL(StageName,"CLOSED WON"), ISPICKVAL(StageName,"CLOSED LOST"),ISPICKVAL(StageName,"NO DECISION"),ISPICKVAL(StageName,"Closed by merger"),ISPICKVAL(StageName,"Closed by FDIC")),

OR (ISPICKVAL(StageName,"D"), ISPICKVAL(StageName,"E"), ISPICKVAL(StageName,"F")))


Any suggestions?
Best Answer chosen by Grace Edmiston
Jason Curtis NBSFDGJason Curtis NBSFDG
Sounds like you want to use a workflow or process to change the data, not a validation rule. Have you worked with those yet? This should be a pretty straight forward process, you would create one based on Opps. The rule would fire whenever a record is edited to meet your criteria and then the associated action would update your StageName field.

All Answers

Jason Curtis NBSFDGJason Curtis NBSFDG
Sounds like you want to use a workflow or process to change the data, not a validation rule. Have you worked with those yet? This should be a pretty straight forward process, you would create one based on Opps. The rule would fire whenever a record is edited to meet your criteria and then the associated action would update your StageName field.
This was selected as the best answer
surasura
As Jason said validation rules are for checking the validity of the data , if you want fields to be update it should be either via a trigger or workflow rule. And in this scenario you can get this done withoutcoding by creating a simplw work flow rule on your object ,
Grace EdmistonGrace Edmiston
Thanks for the feedback! I've created a workflow for this instead. I appreciate the guidance!