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
StephenBStephenB 

Same formula compiles to different lengths on different SF instances, giving formula too big error!

Hi there, posted this in the sforce community boards but then thought it might be a more 'techie' question that someone might have seen before... grateful for any feedback.

Hi there, not sure if anyone has run into this one. I have been doing some work on my developer instance (na3) to create a formula.

if( Forecast_Period__c = "90", case( Probability , 1, 1, 0.9, 1, 0.8, 0.9, 0.7, 0.8, 0.6, 0.7, 0.5, 0.6, 0.4, 0.5, 0.3, 0.4, 0.2, 0.3, 0.1, 0.3, 0, 0, 0), if( Forecast_Period__c = "60", case( Probability , 1, 1, 0.9, 0.9, 0.8, 0.8, 0.7, 0.7, 0.6, 0.6, 0.5, 0.5, 0.4, 0.4, 0.3, 0.3, 0.2, 0.2, 0.1, 0.1, 0, 0, 0), if( Forecast_Period__c = "30", case( Probability , 1, 1, 0.9, 0.9, 0.8, 0.7, 0.7, 0.5, 0.6, 0.3, 0.5, 0.1, 0.4, 0.1, 0.3, 0.1, 0.2, 0, 0.1, 0, 0, 0, 0), 1)) )

This compiles to 1,597 chars, which works fine as it's under the 4k limit. However I then cut and paste to my client's SF instance (emea) and the exact same formula, exact same field names, compile to 18,197 characters! I have re-compiled the formula in the developer instance and it's still fine, so not sure what would be causing this one. It's really driving my nuts as everything else - field names, numbers, the browser, it's all the same!

Anyone else come across this seemingly bizarre issue?

Thanks,
Stephen