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
MeWorkingmanMeWorkingman 

Small formula won't save: Compiled formula is too big to execute

I know that Salesforce formulas suffer from the tendency to explode in size if formulas include other formula fields but I have an extremely tiny formula that includes no other formula fields and the stupid thing compiles to 6,547 characters.  Can anyone explain why?  Here is the formula:

 

IF(ISBLANK(Fax_Received_on_Number__c), "Unknown",
     CASE(RIGHT(Fax_Received_on_Number__c,10), "0005551111", "000-555-1111",
                 "0005552222", "000-555-2222", "000-555-3333"))

 

Fax_Received_on_Number__c is a simple text field that is 40 characters long.  It is not a required field and no default formula is defined for the field.

 

How in the world does that simple formula grow so big when it's compiled?

Ankit AroraAnkit Arora

This is strange as I tried same and it work for me. And the Compiled Size is only 334 characters.

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

MeWorkingmanMeWorkingman

A little more info:  This field has been edited a number of times so I wondered if maybe there was some bug in Salesforce such that multiple edits build up the compiled size for some reason.  So I deleted the field and recreated it.  Once I recreated it, the formula saved successfully.  A real head scratcher...

Ankit AroraAnkit Arora

Thanks for sharing this, but may be some problem at back end. And its good that it is resolved now.

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

ChadMeyerChadMeyer

This is indeed a bug, and I've been afflicted by it several times recently. Deleting and creating is not so terrible if the formula is referenced in only a couple places, but I have some referenced in a dozen places.

 

I am now pushing the matter with SF support, but they are saying I need Premier Support to get bugs fixed with Formulas. Wish me luck.