I got an error when i am implementing formula field.
Error: Compiled formula is too big to execute (5,480 characters). Maximum size is 5,000 characters
I am trying to write a formula field which uses another referenced formula fields and some other fields inside it, hence the compilation size is longer than 5,000 characters. how to reduce the Formula field(datetime) size of it?
IF((CONTAINS(New_Product__c,"6")||CONTAINS(New_Product__c,"Testaccoys 12") || CONTAINS(New_Product__c,"Testaccoys for 12") ||
CONTAINS(New_Product__c,"90"))&&Resend_Email__c=false,
DATE( YEAR( Final_Amount_date__c ) + FLOOR( ( MONTH ( Final_Amount_date__c ) + 7 - 1 ) / 12 ),
MOD( MONTH ( Final_Amount_date__c ) + 7 - 1 + IF( DAY ( Final_Amount_date__c ) >
CASE( MOD( MONTH( Final_Amount_date__c ) + 7 - 1, 12 ) + 1, 2, 28, 4, 30, 6, 30, 9, 30, 11, 30, 31 ), 1, 0 ), 12 ) + 1,
IF( DAY( Final_Amount_date__c ) > CASE( MOD( MONTH( Final_Amount_date__c ) + 7 - 1, 12 ) + 1, 2, 28, 4, 30, 6, 30, 9, 30, 11, 30, 31 ),
1, DAY( Final_Amount_date__c ) ) ),
IF((CONTAINS(New_Product__c,"6")||CONTAINS(New_Product__c,"Testaccoys 12") || CONTAINS(New_Product__c,"Testaccoys for 12") ||
CONTAINS(New_Product__c,"90"))&&Resend_Email__c=true,Final_Amount_date__c+10,IF(CONTAINS(New_Product__c,"180")||CONTAINS(New_Product__c,"24")|| CONTAINS(New_Product__c,"Test VITA 12"),
DATE( year(Final_Amount_date__c )
+ floor((month(Final_Amount_date__c ) + 13)/12) + if(and(month(Final_Amount_date__c )=12,13=12),+1,0) ,
if( mod( month(Final_Amount_date__c ) + 13, 12 ) = 0, 12 , mod( month(Final_Amount_date__c ) + 13, 12 )) ,
min( day(Final_Amount_date__c ),
case(max( mod( month(Final_Amount_date__c ) + 13, 12 ) , 1),
9,30,
4,30,
6,30,
11,30,
2,28,
31
)
)
),null)))