Skip to main content
 I am trying to get this validation rule to work:

 

AND( 

 

ISPICKVAL(Ship_Invoice_Status__c, "Ready to ship"), 

 

ISBLANK( PO_Number__c), 

 

OR( 

 

NOT(ISPICKVAL(StageName,"55 - Customer Eval")), (ISPICKVAL( StageName,"Inactive")) 

 

))

 

Basically if the PO field is empty and it's ready to ship, then a PO is required unless the StageName is either 55 - Customer Eval or Inactive.

 

I have tried several iterations of the above with the same result. I can save a stage 55 no problem, but I am not able to save an Inactive Opportunity without being forced to enter a PO number.

 

Can someone help me see where this is incorrect?

 

Thanks
6 risposte
  1. 21 gen 2011, 22:38
    Bah, I blame 5pm. NOT only negates one think at a time. I believe this will do it:

     

    AND( 

      ISPICKVAL(Ship_Invoice_Status__c, "Ready to ship"), 

      ISBLANK( PO_Number__c), 

      OR( 

        NOT(ISPICKVAL( StageName ,"55 - Customer Eval")), 

        NOT(ISPICKVAL( StageName,"Inactive"))

      )

    )

0/9000