+ Start a Discussion
Irish@accIrish@acc 

Compiled formula is too big to execute (6,581 characters). Maximum size is 5,000 characters,

IF(

AND(

ISNULL(Major_Defect_UAT_Partner__c), ISNULL(Minor_defect_UAT_Partner__c), ISNULL(Compliance_HC__c), ISNULL(Compliance_Launch__c )

),

null,1-IF(ISNULL(Major_Defect_UAT_Partner__c),0,Major_Defect_UAT_Partner__c)-

IF(ISNULL(Minor_defect_UAT_Partner__c),0,Minor_defect_UAT_Partner__c)-

IF(ISNULL(Compliance_HC__c),0,Compliance_HC__c)-

if(ISNULL(Compliance_Launch__c),0,Compliance_Launch__c)

)

---------------------

above formula I'm using when all the fields are null show null else calculate the value..the problem is I can't saved it showing an error..Compiled formula is too big to execute (6,581 characters). Maximum size is 5,000 characters

cbrocbro

If you're referencing information / creating info that has a lot of characters for the system to read (over 5,000 characters), this can happen.  

 

These might help:

https://success.salesforce.com/questionDetail?qId=a1X30000000HYnpEAG 

https://success.salesforce.com/questiondetail?qId=a1X30000000IHrCEAW

 

This also seems to have helped some people: http://www.crmverse.com/four-solutions-to-salesforce-com-too-big-to-execute-formula-error/

 

 

I am not good enough to help fix the formula, but that might be a start.

 

You also might need to use an Apex Trigger, instead.

 

Thanks

 

 

Shannon HaleShannon Hale

It looks like you are referencing each of the other fields in your formula 3 times each. This pulls in the compile size of each of those fields 3 times.

 

I'm guessing at least one of those fields is a large formula that is pushing you over the compile size limit for this field. For each of those, go into the formula field and click Check Syntax to get the compile size. Start with the biggest one and see if you can reduce it by writing the formula more efficiently.

 

If you can't reduce the compile size sufficiently, and you are using Enterprise Edition or Unlimited Edition, you can use a workflow field update to set the value of one of your large formulas: This Help & Training article explains how to do it: https://help.salesforce.com/HTViewSolution?id=000005456&language=en_US

 

Unrelated - ISNULL() should not be used in new formulas, it's deprecated. Use ISBLANK() instead.

Tymon FrancisTymon Francis
On the same page as Shannon, I wasn't able to reduce the size of my formulas, so I created a Proxy text field, then updated that field with a Field Update. I then referenced the proxy field in my other formula field and saved thousands of characters. Hope this helps. 
Andrew RoweAndrew Rowe
Doesn't work on Pricebook Entry.
Nothing can be done on this object.  No Workflows, No Field Updates, No Triggers.
I'm working on developing some local currency fields as we cannot turn on multi-currency due to other functionality we utilize.
There are requests to open up triggers on this object which will fix these issues.
However, those have been open for years and my personal conversations with the Engineering team (over several hours) and our sales team...they are not indicating that this is any sort of priority or even on a radar screen for development.