If I create a field on the grandparent, then create a formula on the parent that displays the grandparent field value on the parent, is there a difference between:

A) Creating a formula on the child that points to parent's formula (that points to the grandparent's field)


B) Creating a formula on the child that points directly to the grandparent's field?

Obviously, both options are functionally equivalent, but I'm wondering if there are advantages to one approach over the other. One advantage of option B is that we can delete the parent formula field and the child formula still works. Is there anything else?



2 Answers 2


Using a formula in another formula increases the dependent's formula compiled size by the original formula's compiled size plus some additional overhead every time you use it. For simple formulas, this may not matter, but keep in mind that complicated formulas will fail to compile sooner when it has to evaluate another formula repeatedly. Additionally, in case it matters, keep in mind that the first option is using two fields, and the number of fields you can have per object is limited. Overall, there is never a point where option A is better than option B, but there are situations where it doesn't matter.

  • There is an advantage: by not using a formula inside another formula, you won't create a dependency, and you will be able to delete the first without worrying about the second. Not much of an advantage... but there isn't really other thing to consider, I think. Commented May 28, 2017 at 3:20
  • @RenatoOliveira That's still an advantage for B. A never has an advantage.
    – sfdcfox
    Commented May 28, 2017 at 3:40

Option B is good.

Salesforce provides an option to reach up to 5 levels for querying relationship objects.

So, it will be better to directly access Grand Parent record, if you really need that as Formula evaluates on the fly. So, evaluating one by one relationship object level formulas could be costly in terms of performance.

If you are really dependent on parent object's formula rather than moving to Grand Parent object, then you can go one by one level up.

You must log in to answer this question.

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