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
T-HanT-Han 

Error when using FLOOR command.

Hi Y'all.

 

F1 = formula field, F2=Custom Field which calculates (0.02*another custom field)

 

I have a a formula field F1 = FLOOR(F2).

 

But I get an error: " Compiled formula is too big to execute (6,659 characters).
Maximum size is 5,000 characters "

 

Any help?

Best Answer chosen by Admin (Salesforce Developers) 
Jeff MayJeff May

When you create a formula, SFDC compiles it from all the pieces used in the formula.  In your case, F2 is likely a formula field that has other formula fields, which could have other formula fields.   This limit is in place to prevent 'mini-programs' being written in formulas.   You can't get around this limit.  You'll have to find a way to reduce each of the formulas contributing to F2.  If that's not possible, its a sign that apex coding (triggers) are needed.

All Answers

Jeff MayJeff May

When you create a formula, SFDC compiles it from all the pieces used in the formula.  In your case, F2 is likely a formula field that has other formula fields, which could have other formula fields.   This limit is in place to prevent 'mini-programs' being written in formulas.   You can't get around this limit.  You'll have to find a way to reduce each of the formulas contributing to F2.  If that's not possible, its a sign that apex coding (triggers) are needed.

This was selected as the best answer
T-HanT-Han

Thanks Jeff.! I got the issue now.. :)