You need to sign in to do that
Don't have an account?
Nick Bosch 4
Validation rule that requires approval process
I'm trying to create a validation rule that prevents reps from moving an opportunity forward until it has been approved by our ops team. I've tried a number of versions of formulas on the forum but I can't seem to get it quite right.
The formula should say that if the opportunity - is a Change Request and the stage has changed or if its new and the stage is either Closed/Won, Closed/Won - Pending, or Closing - 90%, and the Approval Status is either New, Pending, or Rejected - then show the validation rule error that says it must be approved before advancing.
Can someone please highlight where I am going wrong here? I would greatly appreciate any help I can get.
The formula should say that if the opportunity - is a Change Request and the stage has changed or if its new and the stage is either Closed/Won, Closed/Won - Pending, or Closing - 90%, and the Approval Status is either New, Pending, or Rejected - then show the validation rule error that says it must be approved before advancing.
Can someone please highlight where I am going wrong here? I would greatly appreciate any help I can get.
AND (RecordType.Name = "Change Request", OR( ISCHANGED(StageName), ISNEW()), OR( ISPICKVAL(StageName, "Closed/Won"), ISPICKVAL(StageName, "Closed/Won - Pending"), ISPICKVAL(StageName, "Closing - 90%")), OR( ISPICKVAL(Approval_Status__c, "New"), ISPICKVAL(Approval_Status__c, "Pending"), ISPICKVAL(Approval_Status__c, "Rejected") ) )
All Answers
Are you sure the validation rule is active?
Are you testing with records in the right state (record type, approval status and changing stage name)?
IF((AND (RecordType.Name = "Change Request",
OR(
ISCHANGED(StageName),
ISNEW()),
OR(
ISPICKVAL(StageName, "Closed/Won"),
ISPICKVAL(StageName, "Closed/Won - Pending"),
ISPICKVAL(StageName, "Closing - 90%")),
OR(
ISPICKVAL(Approval_Status__c, "New"),
ISPICKVAL(Approval_Status__c, "Pending"),
ISPICKVAL(Approval_Status__c, "Rejected")
)
)), false, true).
I think it will work. Could you please confirm me. If it works oppostite to the criteria, please change value true in false place and false in true place.
I've checked to make sure that I am using the correct names for the record type, stage, and approval status's. It creates an alert for every change though if I use that rule. Any ideas what the problem might be? Other things I could check?
I have checked your senario- "The formula should say that if the opportunity - is a Change Request and the stage has changed or if its new and the stage is either Closed/Won, Closed/Won - Pending, or Closing - 90%, and the Approval Status is either New, Pending, or Rejected - then show the validation rule error that says it must be approved before advancing." and see that your logic is not correct.
Please check the below code. I think this will solve your problem. If not, please confirm me. I will try once again.