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
sagar077sagar077 

Hi Everyone, Please help in this formula fields.. Thanks In advance​​​​​​​

Hi Everyone, I am using this formula on the quote object but getting an error -- Formula(s) that reference this field are no longer valid: Compiled formula is too big to execute (6,019 characters). Maximum size is 5,000 characters (Related field: Formula) 

AND(OR(ISPICKVAL(SBQQ__Type__c ,"Amendment"), ISPICKVAL(SBQQ__Type__c ,"Renewal")),
IF(Quantity_Of_Ischemic_Stroke_Family__c >  SBQQ__Opportunity2__r.Source_Opportunity__r.SBQQ__PrimaryQuote__r.Quantity_Of_Ischemic_Stroke_Family__c,true,

IF(Quantity_Of_Cerebral_Aneurysm_Family__c >  SBQQ__Opportunity2__r.Source_Opportunity__r.SBQQ__PrimaryQuote__r.Quantity_Of_Cerebral_Aneurysm_Family__c,true,

IF(Quantity_Of_Hemorrhagic_Stroke_Family__c > SBQQ__Opportunity2__r.Source_Opportunity__r.SBQQ__PrimaryQuote__r.Quantity_Of_Hemorrhagic_Stroke_Family__c,true,

IF( Quantity_Of_Support_Family__c >  SBQQ__Opportunity2__r.Source_Opportunity__r.SBQQ__PrimaryQuote__r.Quantity_Of_Support_Family__c,true,

IF( Quantity_Of_Synchronized_Care_Family__c > SBQQ__Opportunity2__r.Source_Opportunity__r.SBQQ__PrimaryQuote__r.Quantity_Of_Synchronized_Care_Family__c,true,false))))))
ANUTEJANUTEJ (Salesforce Developers) 
Hi Sagar,

>> https://salesforce.stackexchange.com/questions/245492/formulas-that-reference-this-field-are-no-longer-valid-compiled-formula-is-to

As mentioned in the above link If you did this in workflow with a field update, the formula is unlimited in size. The main drawback to this approach is that the data only updates when the item is updated while formula fields 'update' when they are accessed.

Set the workflow to always fire. let it take all of the data and calculate a response and update a standard field. (resultA)

Then use the formula field to compare that result (resultA) with the items that change as the day changes. (for example: 'days between A and Z < 14' etc)

This way you can have a single call in the formula to a standard field.

Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.  

Thanks.
AnudeepAnudeep (Salesforce Developers) 
Within Salesforce standard functionality, Formula fields can’t exceed 5,000 bytes when compiled. The compile size is the size of the formula (in bytes) including all of the fields, values, and formulas it references.

This means that you'll already exceed the byte limit along with the other formula fields that reference those fields.

This happens and this is a consideration because when one formula field gets calculated, the back end system calculates all other formula fields that has the same reference.

I recommend reviewing the following posts where a similar discussion was already made

https://developer.salesforce.com/forums/?id=906F00000008xPIIAY

https://salesforce.stackexchange.com/questions/143786/compiled-formula-is-too-big-to-execute-error

Let me know if this helps, if it does, please mark this answer as best so that others facing the same issue will find this information useful. Thank you