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
Jake GriffithsJake Griffiths 

Error: Syntax Error. Missing ")" - Validation Rule

Hi,

I am trying to run a validation on the opportunity object only when the Deal Type (Deal_Type__c) is set to 'Direct' and the Amount (Amount_Financed__c) is greater than or equal to $1m and the user is trying to change the stage to "Submitted for Approval".

I have developed the following script but cannot make it work only in the above conditions and now I cant get my script past a syntax error.

SCRIPT::::::


IF(
(OR
(
(Amount_Financed__c >= 1000000),
(TEXT(Deal_Type__c) = "Direct"), 
(TEXT(StageName) = "Submitted for Approval")
)
),
(
ISBLANK(Introducer_Program_Partner__c), 
ISPICKVAL(Introducer_Program_Partner__r.Relationship_Type__c,""), 
ISBLANK(Account.Legal_Name__c), 
ISBLANK(Account.Common_Name__c), 
ISBLANK(Account.ABN__c), 
ISBLANK(Account.ACN__c), 
ISBLANK(Account.Phone), 
ISBLANK(Account.Website), 
ISBLANK(Account.Customer_Email__c), 
(Account.OJSERLIB__IsBillingAddressValid__c = FALSE), 
ISPICKVAL(Account.Industry,""), 
ISPICKVAL(Account.Entity_Type__c,""), 
ISBLANK(Account.Business_Age__c), 
ISBLANK(Account.Accountant__c), 
ISBLANK(Account.Group_Structure__c), 
ISBLANK(Account.Role_of_Borrower_within_Group_Structure__c), 
ISBLANK(Account.Key_Contracts_Relationships__c), 
ISBLANK(Proposed_Funding_Strucutre__c), 
ISBLANK(Description), 
ISBLANK(Amount_Financed__c), 
ISPICKVAL(Product_Type__c,""), 
ISPICKVAL(Product__c,""), 
ISBLANK(Term__c), 
ISPICKVAL(Payment__c,""), 
ISPICKVAL(Instalment_Timing__c,""), 
ISBLANK(Balloon_Residual_Value_RV__c), 
ISBLANK(Risk_Approved_Margin__c), 
ISPICKVAL(Currency__c,""), 
ISPICKVAL(Payment_Method__c,""), 
ISBLANK(Supporting_Information__c), 
ISPICKVAL(Asset_Type_1__c,""), 
ISPICKVAL(Asset_Type_2__c,""), 
ISBLANK(Asset_Cost_Excl_GST__c), 
ISBLANK(Asset_Use__c), 
ISPICKVAL(New_or_Used_Asset__c,""), 
ISPICKVAL(Asset_Location_State__c,""), 
(Account.GSA_Over_Company__c = FALSE), 
/*(Account.ppsr_search_completed__c = FALSE),*/ 
ISBLANK(Account.Existing_Debt_Commitments__c), 
ISBLANK(Account.DSC_Debt_Service__c), 
ISPICKVAL(Account.Obligor_Externally_Rated_Company_Ratin__c,""), 
ISPICKVAL(Account.Obligor_Parent_External_Rating__c,""), 
(Account.ATO_Portal_Access_Provided__c = FALSE) 
)
)
 
Arti KulkarniArti Kulkarni
Hi Jake,

I think you are missing the else part in your If statement. Your formula states If (Or(), do something) and then you have not specified the else part

Hope this helps

Thanks,
Arti