Skip to main content
I am trying to validate opportunities so that you can not close/win or place in 'trial period' an opportunity UNLESS a 'product' has been selected.

 

We are not using the products like SF designed, rather there are 5 product check boxes.

 

Product1__c

 

Product2__c

 

Product3__c

 

Product4__c

 

Product5__c

 

These are checkboxes, aka true/false.

 

In order to close/win an opportunity I need to require ONE of them to be checked. If there are more than one, cool, but at least ONE has to be checked.

 

My logic seems to not be right, but I am still new to this.

 

I was thinking something like:

 

AND(

OR (

ISPICKVAL(StageName, "Closed Won"), ISPICKVAL(StageName, "Trial Period")), 

OR  (

(Product1__c = FALSE), (Product2__c = FALSE), (Product3__c = FALSE), (Product4__c = FALSE), (Product5__c  = FALSE)))

 

This logic seems to require that ALL products be checked.

 

 

I need it to require at LEAST ONE, but not ALL.

 

 

I'm still researching this, but any help would be appreciated.

 

 

I believe my use of OR is wrong here.
5 respuestas
  1. 5 nov 2012, 17:57
    The issue is that you want the rule to trigger if they are all FALSE, because if they are all false, then no Product has been added. Instead of OR you need to use AND:

     

     

    AND(

              OR( ISPICKVAL(StageName, "Closed Won"),

     

                      ISPICKVAL(StageName, "Trial Period")

     

                    ), 

            AND(Product1__c = FALSE,

     

                      Product2__c = FALSE,

     

                      Product3__c = FALSE,

     

                      Product4__c = FALSE,

     

                      Product5__c  = FALSE

     

                    )

     

    )
0/9000