I am writing validation rule on Opportunitylineitem object
I am getting below error
I have a requirement- while adding a product on Opp, if product.termOfContract is not Annual(ARR) and {(field1 not equal to 0) or (field3 not equal to 0 ) or (field4 not equal to 0) or (field2 not equal to 0 ) }
term of contract is a picklist field , its field value api name= Annual (ARR)
then show error message
6 个回答
Eric Praud (Activ8 Solar Energies) Forum Ambassador
Personally, I'm not very good with || and &&, try this and see if it works better:
AND(NOT(ISPICKVAL(Product2.Term_of_Contract_-c, "Annual (ARR)")), OR(Year_2_Sales_Price__c<>0, Year_2_Qty__c<>0, Year_3_Sales_Price__c<>0, Year_3_Qty_Hr__c<>0))