Print this page

Error: "Maximum of 10 object references on [Object Name]. You must remove at least 1 relationship(s)..."

Knowledge Article Number 000171213

Every object has a limit of 10 spanning relationships (other object references). If you try to create a formula that references more than 10 objects, you'll likely receive an error message titled "You have reached the maximum number of 10 object references on [Object name]. You must remove at least 1 relationship(s) in order to save this [Workflow Rule/formula field/..]."

The limit of 10 spanning relationships is a warning sign that the logic is getting too complex for the formula engine. We're happy to increase the limit up to a maximum of 15 so you aren't blocked, but you may also want to consider using more programmatic logic (as listed below).


Ways to reduce the number of spanning relationships

  • Are there other ways of exposing data in formula fields that could work? For example, if you need to see information on an object 1-2 levels away on an object’s detail page but not report on it, you could require users to hover over the lookup link to view the details.
  • Could a junction object work? If you have multiple references to the same type of object (for example, you reference 4 different contacts in formula fields, each with a different purpose), a junction object could display the referenced objects in a related list.
  • Are the references only used in validation rules? If so, you can rewrite those rules as an Apex trigger.
  • Are the references only used by one component? If so, convert that to a trigger.
  • Does the relationship span multiple levels of a hierarchy? If you're spanning multiple levels of a hierarchy (such as parent accounts, cases, or a hierarchy of custom objects), see if it’s possible to flatten the hierarchy.

If the answer to any of these questions is "yes," there are alternatives to increasing the spanning limit.

NOTE: As of Winter '17, the default limit has been raised from 10 to 15. However, 15 remains a hardcoded limit for the maximum number of Spanning Relationship per Entity. Therefore, we won't be processing increase requests for higher than 15. 


promote demote