+ 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.. :)