+ Start a Discussion
RobKretzRobKretz 

Validation Rules within Opportunities

I would like to set a validation rule into my "stages" picklist in Opportunities.  I would like to have a rule -set to an approval process- before the stage is set to "follow up". I have the approval process set up. I'm lost on the structure of what the validation rule must be set to. Any assistance would be greatly appreciated. Thank you.

RobKretzRobKretz

Title would be : Opportunity must be approved before Follow Up

 

Formula:

 

AND(

         OR(

                 ISPICKVAL ( StageName, "Follow Up"),

NOT ( ISPICKVAL( Approval_Status_c, "Approved") ) )

 

No idea if this is correct. Any help would be great! Thanks in advance.

JayantJayant

Try this -

 

IF( AND( ISPICKVAL( StageName ,'Follow Up') , NOT( ISPICKVAL( Approval_Status__c , 'Approved') ) ) , TRUE, FALSE)

 

Let me know if this works...

 

Thanks.

RobKretzRobKretz
Thank you. I copied / pasted this - checked syntax and this is the error that shows "Error: Field Approval_Status__c does not exist. Check spelling." Maybe there's a step I missed? Thanks.
RobKretzRobKretz
Also want to add- I went to the "Useful Validation Rules " PDF to try and find some help. There's an example on page 16 titled, " High value opportunity must be approved before closed". It states that "Opportunities with amounts great than $50,000 require a CUSTOM CHECKBOX FIELD called APPROVED is checked in order to change the stage to CLOSED WON or CLOSED LOST. To automate this, SET FIELD LEVEL SECURITY on the APPROVED checkbox ( making the standard user "read only" ? ) so that it can only be checked via a custom approval process. " Relative to my case, I've made the changes - I have the APPROVED checkbox field in Opportunities - as well as a custom approval process. I checked the formula you have provided above and still get the same error. Again, thanks in advance for any help.
JayantJayant

Hey Rob,

 

I picked that Approval_Status__c from your second message in which you have written some rule, right.

 

OK, Do you have any field that gets updated after someone approves as per your Approval process.

 

If yes, just replace Approval_Status__c in (Approval_Status__c , 'Approved') with the API name of that field and Approved with the string literal, it is set to after approval.

 

If you still face any issues, let me know your requirement in detail (including the fields involved) and then we can figure this out.

JayantJayant

Try this -

IF( AND( ISPICKVAL( StageName,'Follow Up') , NOT( Approved__c =TRUE) ) , TRUE, FALSE)

 

This would block the Save if you are setting stage as 'Follow Up' and your checkbox called Approved is not checked.

 

Thanks. 

RobKretzRobKretz
Could you please e-mail me. rkretzmer@plainfieldprecision.com Thank you.