+ Start a Discussion
Rich13Rich13 

Error: Compiled formula is too big to execute (5,593 characters).

Hi ,

 

I am implementing the lead scoring framework in SFDC, as part of this process I have created a formula field to calculate the location rating. Formula as below:

IF( 

(

Corporate_Headquarters__c  = "AL" ||

Corporate_Headquarters__c  = "HI" ||

Corporate_Headquarters__c  = "ID" ||

Corporate_Headquarters__c  = "LA" ||

Corporate_Headquarters__c  = "MT")

,15,0)

 

In this way I have 3 blocks for all the 51 United states with different scores (15,20,25). (Not Copying the complete formula here as it is big and for 51 states) . When I checked it for syntax its show the green line with no Syntax error and compiled size as about 2000 characters.

 

But when I try to save, it is throwing the error as " Error: Invalid Data. Review all error messages below to correct your data.
Formula(s) that reference this field are no longer valid: Compiled formula is too big to execute (5,593 characters). Maximum size is 5,000 characters (Related field: Formula)"

 

I expeirmented by creating 3 formula fields and put the 3 blocks and finally added all these 3 forumla fields putting in an another final Formula filed. But still it is throwing the same error.

 

I tried this logic with CASE function also, but same error, even more characters.

 

Please any body guide me on this.

 

Thank You.