Skip to main content
Hi All,

 

I'm really confused with this error message if this the right error or Is it that I'm missing something here , your help here is much appriciated.

 

 I have created a custom formula field in the Opportunity Object based on the requirements I have written the formula ( excuse my formual style, as I'm amature in formulas). I see this error when I do the syntax check. 

 

I'm open to suggestions for any better way of writting this logic, also which tool to use to check syntax in case in end up in such situation in future. Thank you.

 

IF(

 

        AND(ISBLANK( Interims_Complete_Date__c),ISBLANK( Initial_Status_Report_Sent_Date__c)), "On track to meet SLA",

 

IF( 

 

    AND( NOT( ISBLANK( Interims_Complete_Date__c )), RecordTypeId == "0120Y000000ks1iQAA",Days_to_Audit__c + Days_to_Raw_Data__c + Days_to_Audit_Report__c <= 57),"SLA Met",

 

IF( 

 

    AND( NOT( ISBLANK( Interims_Complete_Date__c )), RecordTypeId == "0120Y000000ks1jQAA",Days_to_Audit__c + Days_to_Raw_Data__c + Days_to_Audit_Report__c <= 57),"SLA met",

 

IF( 

 

    AND( NOT( ISBLANK( Interims_Complete_Date__c )), RecordTypeId == "0120Y000000ks1lQAA",Days_to_Audit__c + Days_to_Raw_Data__c + Days_to_Audit_Report__c <= 57),"SLA met",

 

IF( 

 

    AND( NOT( ISBLANK( Initial_Status_Report_Sent_Date__c )),NOT(ISBLANK(Pre_Kickoff_Documentation_Received_Date__c)),RecordTypeId == "0120Y000000ks1iQAA", ( Initial_Status_Report_Complete_Date__c -Pre_Kickoff_Documentation_Received_Date__c) <= 14),"SLA met" ,

 

IF( AND( NOT( ISBLANK( Initial_Status_Report_Sent_Date__c )),NOT( ISBLANK( Post_Kickoff_Documentation_Received_Date__c )),

 

RecordTypeId == "0120Y000000ks1iQAA",( Initial_Status_Report_Sent_Date__c - Post_Kickoff_Documentation_Received_Date__c ) <= 30),"SLA met" ,

 

"SLA not met"))))

 

 
7 respuestas
  1. 3 mar 2021, 14:37
    Hi Padmashree,

     

    Try the below one,

    IF(

    AND(ISBLANK( Interims_Complete_Date__c),ISBLANK( Initial_Status_Report_Sent_Date__c)),

    "On track to meet SLA",

    IF(

    AND( NOT( ISBLANK( Interims_Complete_Date__c )),

    (Days_to_Audit__c + Days_to_Raw_Data__c + Days_to_Audit_Report__c <= 57),

    OR(RecordTypeId == "0120Y000000ks1iQAA",

    RecordTypeId == "0120Y000000ks1jQAA",

    RecordTypeId == "0120Y000000ks1lQAA"

    )

    ),"SLA Met",

    IF(

    AND( NOT( ISBLANK( Initial_Status_Report_Sent_Date__c )),

    NOT(ISBLANK(Pre_Kickoff_Documentation_Received_Date__c)),

    RecordTypeId == "0120Y000000ks1iQAA",

    ( Initial_Status_Report_Complete_Date__c -Pre_Kickoff_Documentation_Received_Date__c) <= 14),"SLA met" ,

    IF( AND( NOT( ISBLANK( Initial_Status_Report_Sent_Date__c )),

    NOT( ISBLANK( Post_Kickoff_Documentation_Received_Date__c )),

    RecordTypeId == "0120Y000000ks1iQAA",

    ( Initial_Status_Report_Sent_Date__c - Post_Kickoff_Documentation_Received_Date__c ) <= 30),"SLA met" ,

    "SLA not met"))))

     

    And you have hard coded record type Id, its not a right approach.

     

    Use like below instead of RecordTypeId

    RecordType.DeveloperName = 'YourRecordTypeName'

    Replace RecordTypeName' eg. Customer_Relationship

    Please try and let me know the results.