function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Liz DwanLiz Dwan 

Rule for stage progression

Hi,
I am looking to create a rule to ensure a field (checkbox) is ticked before a user is allowed to progress to higher opportunity stages

Or a rule to ensure a file is attached to an opportunity before progressing to higher opportunity stages. 

Thanks
Best Answer chosen by Liz Dwan
Manuel Jiménez GonzálezManuel Jiménez González

NOT(AND( My_Checkbox_Field , OR(TEXT(StageName) ="Preferred",   TEXT(StageName) = "Negotiation",   TEXT(StageName) = "Closed Won" )))
 

All Answers

Manuel Jiménez GonzálezManuel Jiménez González
Hi Liz, 

You should create a validation rule to check if the field is ticked and is changing the stage, something like:

NOT(AND(Your_field_checkbox, ISCHANGED(STAGE)))

So only when the field is ticked you can changed the stage.
 
Liz DwanLiz Dwan
Hi Manuel, 
The formula is working but I need to be more specific as the check box only applies to three specific stages. 'Preferred, Negotiation & Closed Won
Manuel Jiménez GonzálezManuel Jiménez González
Hi Liz,

Maybe you can try something like this:

NOT(AND(Your_field_checkbox, OR(Stage="Preferred", Stage="Negotiation", Stage="Closed/Won"))
 
Liz DwanLiz Dwan
NOT(AND( My_Checkbox_Field , OR(StageName ="Preferred",   StageName = "Negotiation",   StageName = "Closed Won" )))

Error: Field StageName is a picklist field. Picklist fields are only supported in certain functions

 
Manuel Jiménez GonzálezManuel Jiménez González

NOT(AND( My_Checkbox_Field , OR(TEXT(StageName) ="Preferred",   TEXT(StageName) = "Negotiation",   TEXT(StageName) = "Closed Won" )))
 
This was selected as the best answer
Liz DwanLiz Dwan
I tryed adding this to the start but I am getting an Error for NOT at the start of my other formula.
ISPICKVAL( Type, "New Business") 

What do I need to amend to have this applied only to type new Business.

Thanks for your help on this Manuel!
 
Manuel Jiménez GonzálezManuel Jiménez González
Can you show the complete formula you are trying to do?
Liz DwanLiz Dwan
ISPICKVAL( Type, "New Business") 
NOT(AND( Closing_Plan__c , OR(TEXT(StageName) ="Preferred",   TEXT(StageName) = "Negotiation",   TEXT(StageName) = "Closed Won" )))
Liz DwanLiz Dwan
Manuel,

I need to change my query and therefore my Formula.

If the amount field is over 70k the check box needs to be true in order to progress the the next three stages.
NOT(AND( Closing_Plan__c , OR(TEXT(StageName) ="Preferred",   TEXT(StageName) = "Negotiation",   TEXT(StageName) = "Closed Won" )))

Thanks!