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
Vickie SmithVickie Smith 

Need help with a complex formula

I'm trying to edit a Opportunity Custom Field we call Group Contract Fee. Right now it is set up to populate a $75 fee if its International and a $50 if its Domestic and if it’s a AirHotel booking, it marks it as $0 Contract Fee.
 
Original:
IF((ISPICKVAL(Intl_Dom__c,'I') && (Air_Hotel__c = False) && (Account.Waive_Contract_Fee__c) = False),75,
IF((ISPICKVAL(Intl_Dom__c,'D') && (Air_Hotel__c = False) && (Account.Waive_Contract_Fee__c) = False),50,
IF((Air_Hotel__c = True),0,0)))
 
I need to make it a bit more complex: I need to also include that if it is a booking made through 2 specific accounts, that books a group 20 passengers or more, International and Air Only - I need that to also show $0.00 in the Contract fee field
 
IF((ISPICKVAL(Intl_Dom__c,'I') && (Air_Hotel__c = False) && (Account.Waive_Contract_Fee__c) = False),75,
IF((ISPICKVAL(Intl_Dom__c,'D') && (Air_Hotel__c = False) && (Account.Waive_Contract_Fee__c) = False),50,
IF((Air_Hotel__c = True) || ((ISPICKVAL( Intl_Dom__c,'I' = True) && ( Air_Hotel__c  = False) && ( Total_Pax__c  < 19) && ( Account.Travel_Agency_Id__c,’14913275’ || '52667252'= True))),0,0))
 
But I’m getting a Error: Syntax error. Missing ')'
 
Marcilio SouzaMarcilio Souza
Try to add a ')' in the end of the statament 
IF((ISPICKVAL(Intl_Dom__c,'I') && (Air_Hotel__c = False) && (Account.Waive_Contract_Fee__c) = False),75,
IF((ISPICKVAL(Intl_Dom__c,'D') && (Air_Hotel__c = False) && (Account.Waive_Contract_Fee__c) = False),50,
IF((Air_Hotel__c = True) || ((ISPICKVAL( Intl_Dom__c,'I' = True) && ( Air_Hotel__c  = False) && ( Total_Pax__c  < 19) && ( Account.Travel_Agency_Id__c,’14913275’ || '52667252'= True))),0,0)))

OR try to test you sentences individual first.

Each 'IF' for time