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
Sreejith KalarikkalSreejith Kalarikkal 

Validation rule Syntax error

NOT (ISPICKVAL( Transfer_ID__r.Transfer_Type__c , 'Store to WHS') AND (Shipping_Quantity__c > Serial_No__r.Quantity_available__c ))

I am getting ) missing in thie validation rule, Can someone help?
Amit Chaudhary 8Amit Chaudhary 8
Please try below validation rule
AND( 
	NOT (ISPICKVAL( Transfer_ID__r.Transfer_Type__c , 'Store to WHS') ) ,
    (Shipping_Quantity__c > Serial_No__r.Quantity_available__c ) 
	
)

 
Malni Chandrasekaran 2Malni Chandrasekaran 2
Sreejith,
Please try this,
NOT(
AND(
ISPICKVAL( Transfer_ID__r.Transfer_Type__c , 'Store to WHS'), 
(Shipping_Quantity__c > Serial_No__r.Quantity_available__c )
)
)

The syntax for AND operator is AND(Boolean exp 1, Boolean exp2)

 
Shiv Shankar 80Shiv Shankar 80
Hi Sreejith,

Try this below code.

NOT (
         AND (
                     ISPICKVAL( Transfer_ID__r.Transfer_Type__c , 'Store to WHS') ,(Shipping_Quantity__c > Serial_No__r.Quantity_available__c )
                  )
         )

Thie syntax is : NOT(    AND  (ISPICKVAL(VAL1)  ,  VAL2 )  )
juhi dhiverjuhi dhiver
Try this :
NOT (ISPICKVAL( Transfer_ID__r.Transfer_Type__c , 'Store to WHS')) &&
NOT((Shipping_Quantity__c > Serial_No__r.Quantity_available__c ))

You missing the first bracket of NOT.
Try else let me know.