I thought it would be easier to find the answer to those but do Visual Force formulas have the 5000 byte compile limit? I have formulas that are based on lookups that are based on lookups. I can make them work in Process Builder or with a Flow but I would rather not have to trigger an edit to call the formula.

Is Visual Force a good idea for this or am I barking up the wrong tree?

  • What do you mean by "those visualforce formulas"? Do you mean the merge expression syntax {!something.field1__c + something.field2__c}? Giving an example would probably help here.
    – Derek F
    Sep 7, 2018 at 16:32

1 Answer 1


Formally, they're "expressions," not "formulas," but they do use a similar syntax. As long as you're not using apex:form, expressions in a Visualforce page can be as complicated as allowed by the maximum execution time. If you use apex:form, then your expressions will eventually fill up the View State, which is limited to 135k, but it's not a linear growth, either. If all you want to do is display information when you load a record, Visualforce is a decent alternative to Process Builder, etc.

  • In a few rare cases I have had a too-complicated declarative formula in VF. One way to piece that out is to save one portion of the calculation in an apex:variable and then reference it in the formula. This comes with the proviso that apex:variable names can cause trouble if they collide with the same name used in any Visualforce page/component/controller in the same Apex transaction.
    – Charles T
    Sep 7, 2018 at 17:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .