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
JudieannMcCueJudieannMcCue 

Increase Formula Compiled Size above 5000

I have the following formula written to score opportunity records. 

 

IF( Total_Qualification_Score__c <= 15, "Highly Unfavorable",
IF( Total_Qualification_Score__c <= 23, "Unfavorable",
IF( Total_Qualification_Score__c <= 35, "Moderate",
IF( Total_Qualification_Score__c <= 47, "Favorable",
"Highly Favorable"))))

 

Problem is, I get the following error:

 

Error: Compiled formula is too big to execute (9,664 characters).

 

Apparently this is because the Total_Qualification_Score field is also a formula.  SFDC Help Desk could not help me resolve this issue and suggested I post to this discussion board.  Thoughts?

coolleo88coolleo88

Hi Judean,

 

There is a limit in salesforce as in which count the number of characters used in a formula field. Here "Total_Qualification_Score__c " is also a formula field and it is you are using this formula field in another formula. So the number for character in both the combined formula field is exceeding the limit and you are getting an error. 

 

Solution to this is either reduce the no. of characters or achieve this with help of code.

 

Thanks.

SFFSFF

You could also offload some of the processing to a trigger or, possibly, a workflow (depending on what is actually happening in the existing formula). When I've run into this problem in the past, I've had to, effectively, calculate Total_Qualification_Score__c in a trigger and then use a formula field for the final calculation.

 

There is no way to increase the formula compiled size.

 

Hope this helps,