Formula field reference restrictions
Key Takeaway
A formula must reference a usable field, stay within the limits of 10, and name the owner type when the Owner field can point to different object types.
A formula field calculates its value from other fields, but Salesforce limits which fields a formula can use and how far it can reach to get them. Some field types are blocked entirely. References to related objects follow relationship limits. Activities, Owner fields that can point to different object types, and external objects need special handling or can't be referenced at all.
What a formula can reference
A formula can reference fields on its own object and on records related through a lookup or master-detail relationship. A formula that spans related objects this way is a cross-object formula. On the detail side of a master-detail relationship, a cross-object formula can reference merge fields from the master (parent) object.
For example, a validation rule formula on Opportunity can reference merge fields for Account, Campaign, and Opportunity.
Cross-object formulas work anywhere formulas are used except default values. A default value formula for a record type can reference only fields for that record type. In contrast, formula fields, approval formulas, and rule formulas can reach records related through a lookup or master-detail relationship.
Cross-object formulas can't reference merge fields for objects related to activities. For example, Contact and Account merge fields aren't available in Task and Event formulas.