0

I am using the following code which checks if a group of fields evaluate to TRUE then it has to be approved. No syntax error but approval is not working correctly.

((AND 
(ISPICKVAL(Does_client_have_an_onsite_ATM__c, "Yes"), 
KYC_Addendum_ATM_entries__c >= 1) 
|| 
(AND 
(ISPICKVAL(Does_client_have_an_onsite_ATM__c, "No"), 
KYC_Addendum_ATM_entries__c = 0) ) 

&& 

(AND(ISPICKVAL( PIC_IBC__c , "Yes"), 
KYC_Addendum_PIC_IBC_entries__c >= 1) 
|| 
AND(ISPICKVAL( PIC_IBC__c , "No"), 
KYC_Addendum_PIC_IBC_entries__c = 0)) 

&& 

(NOT(ISNULL(Business_activity_engagements__c))&& KYC_Addendum_MSB_entries__c >= 1 
|| 
NOT(ISNULL(Business_activity_engagements__c))&& KYC_Addendum_MSB_entries__c = 0 ) 

&& 

(AND(ISPICKVAL( Cash_Intensive__c , "Yes"), 
KYC_Addendum_Cash_Intensive_entries__c >= 1) 
|| 
AND(ISPICKVAL( Cash_Intensive__c , "No"), 
KYC_Addendum_Cash_Intensive_entries__c = 0)) 

&& 

(AND(ISPICKVAL( Convenience_store_gas_station__c , "Yes"), 
KYC_Addendum_Convenience_Store_entries__c >= 1) 
|| 
AND(ISPICKVAL( Convenience_store_gas_station__c , "No"), 
KYC_Addendum_Convenience_Store_entries__c = 0) ) 

&& 

(AND(ISPICKVAL( Criminal_Defense_Attorney__c , "Yes"), 
KYC_Addendum_Crim_def_att_entries__c >= 1) 
|| 
AND(ISPICKVAL( Criminal_Defense_Attorney__c , "No"), 
KYC_Addendum_Crim_def_att_entries__c = 0) ) 

&& 

(AND(ISPICKVAL( Grocery_store__c , "Yes"), 
KYC_Addendum_Grocery_Store_entries__c >= 1) 
|| 
AND(ISPICKVAL( Grocery_store__c , "No"), 
KYC_Addendum_Grocery_Store_entries__c = 0) ) 

&& 

(AND(ISPICKVAL( Law_Firm__c , "Yes"), 
KYC_Addendum_Law_Firm_entries__c >= 1) 
|| 
AND(ISPICKVAL( Law_Firm__c , "No"), 
KYC_Addendum_Law_Firm_entries__c = 0) ) 

&& 

(AND(ISPICKVAL( Non_Bank_Financial_Institution__c , "Yes"), 
KYC_Addendum_NBFI_entries__c >= 1) 
|| 
AND(ISPICKVAL( Non_Bank_Financial_Institution__c , "No"), 
KYC_Addendum_NBFI_entries__c = 0) ) 

&& 

(AND(ISPICKVAL( Night_Club__c , "Yes"), 
KYC_Addendum_Night_Club_entries__c >= 1) 
|| 
AND(ISPICKVAL( Night_Club__c , "No"), 
KYC_Addendum_Night_Club_entries__c = 0) ) 

&& 

(AND(ISPICKVAL( Non_Profit_Charity_NGO__c , "Yes"), 
KYC_Addendum_NP_Charity_NGO_entries__c >= 1)) 
|| 
AND(ISPICKVAL( Non_Profit_Charity_NGO__c , "No"), 
KYC_Addendum_NP_Charity_NGO_entries__c = 0)))
  • I think you must be looking for || not && between the main statements – Caspar Harmer Jan 12 '16 at 20:41
  • 3
    these problems are amenable to simplification by starting with just one block of conditions, testing, then adding another block, testing, etc. – cropredy Jan 12 '16 at 20:58
  • Exactly - I was going to say that too... – Caspar Harmer Jan 12 '16 at 22:34
  • What is criteria for approval process? Just this field equal true? Did you test if formula evaluates to true correctly? – Paul Boiko Jan 13 '16 at 3:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.