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.
Error :Compiled formula is too big to execute (8,205 characters). Maximum size is 5,000 characters
I'm open to suggestions for any better way of writting this logic, Thank you.
IF(
AND(ISBLANK(Days_to_Audit__c),ISBLANK(Days_to_Raw_Data__c),ISBLANK(Days_to_Audit_Report__c),(Days_to_Audit__c + Days_to_Raw_Data__c + Days_to_Audit_Report__c < 57), OR (Days_to_Audit__c <57, Days_to_Raw_Data__c <57 , Days_to_Audit_Report__c <57 )),
"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(RecordType.DeveloperName == 'UK_New_Development',
RecordType.DeveloperName == 'Occupied',
RecordType.DeveloperName == 'Renewal'
)
),"SLA met",
IF(
AND( NOT( ISBLANK( Initial_Status_Report_Sent_Date__c )),
NOT(ISBLANK(Pre_Kickoff_Documentation_Received_Date__c)),
RecordType.DeveloperName == 'UK_New_Development',
( 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 )),
RecordType.DeveloperName == 'UK_New_Development',
( Initial_Status_Report_Sent_Date__c - Post_Kickoff_Documentation_Received_Date__c ) <= 30),"SLA met" ,
"SLA not met"))))
1 respuesta
You can try to create pre calculation such as
Total_Audit_Days
Formula :
Days_to_Audit__c + Days_to_Raw_Data__c + Days_to_Audit_Report__c
Pre_Kickoff_Duration
Formula :
IF( NOT(ISBLANK(Pre_Kickoff_Documentation_Received_Date__c)),
( Initial_Status_Report_Complete_Date__c -Pre_Kickoff_Documentation_Received_Date__c),0)
Post_Kickoff_Duration
Formula :
IF(NOT( ISBLANK( Post_Kickoff_Documentation_Received_Date__c )),
( Initial_Status_Report_Sent_Date__c - Post_Kickoff_Documentation_Received_Date__c ),0)
And use these fields in the final formula :
ISBLANK(Days_to_Audit__c),
ISBLANK(Days_to_Raw_Data__c),
ISBLANK(Days_to_Audit_Report__c),
(Total_Audit_Days < 57),
OR (
Days_to_Audit__c <57,
Days_to_Raw_Data__c <57 ,
Days_to_Audit_Report__c <57 )
),
"On track to meet SLA",
IF(
AND(
NOT( ISBLANK( Interims_Complete_Date__c )),
(Total_Audit_Days <= 57),
CASE(
RecordType.DeveloperName,
'UK_New_Development', 1,
'Occupied', 1,
'Renewal',1,0
)
),"SLA met",
IF(
AND(
NOT( ISBLANK( Initial_Status_Report_Sent_Date__c )),
RecordType.DeveloperName == 'UK_New_Development',
Pre_Kickoff_Duration <= 14),"SLA met" ,
IF(
AND(
NOT( ISBLANK( Initial_Status_Report_Sent_Date__c )),
RecordType.DeveloperName == 'UK_New_Development',
( Post_Kickoff_Duration ) <= 30),"SLA met" ,
"SLA not met"))))
Cheers,
Cathy