When you create a new formula (in a Formula Field, Field Update or Validation Rule), you may get the following error or something similar:
You have reached the maximum number of 15 object references on ObjectName
You must remove at least 1 relationship(s) in order to save this Formula Field.
Related objects referenced in this Formula Field:
This error occurs because you have reached the limit of spanning relationships (also known as cross-object reference) per object.
Objects can be related to each other via a Relationship Field. When objects are related to each other, Formula Fields can reference fields on those other objects.
For example:
A Formula that references a field on another object is known as a Spanning Relationship.
The limit of spanning relationships per object is 15.
This means that an object can only contain up to 15 different object references.
This count is based on the number of unique relationships referenced in formulas in the following components of an object:
Note: Self-reference lookup relationships are considered a "different" object when counting the number of spanning relationships. For example, if there's a lookup on the account object looking up to itself and it's used in a formula, it will count as another spanning relationship.
For these examples, assume the following:
One Spanning Relationship
When creating a formula on Object1, reference another object, like this:
LookupObject1__r.Amount + LookupObject1__r.Discount / LookupObject1__r.Tax
In this example, three fields are referenced on an object via a single Lookup. Because each of these fields is referenced via a single Lookup, this is considered one Spanning Relationship. If the same object were referenced via a different Lookup, it would be considered a separate Spanning Relationship.
Three spanning relationships
When creating a formula on Object1, reference another object, like this:
LookupObject1__r.Amount + LookupObject2__r.Discount / LookupObject3__r.Tax + LookupObject3__r.Tip - LookupObject3__r.Total
Although there are five fields here, only three objects are being referenced (Object1, Object2, Object3). This would be considered three Spanning Relationships.
Four spanning relationships
First, create a Formula Field like this:
LookupObject1__r.Amount + LookupObject2__r.Discount
Next, create a validation rule that looks like this:
ISBLANK(LookupObject3__r.Amount) && LookupObject4__r.Discount < 145
In this case, each of these object references is its own Spanning Relationship. The formula field references two Objects (Object1 and Object2) and is thus two Spanning Relationships. The Validation Rule references a different two Objects (Object3 and Object4), adding another two Spanning Relationships. This brings the total for both of these formulae to four Spanning Relationships
Other Quick Examples:
Given the above examples as a guide, there are a number of ways to reach the Spanning Relationship limit, including the following:
When the limit of Spanning Relationships is exceeded, the error message will give more information about the offending Objects, references, and formulas.
Specifically, the error will show the total references being used (and by which field) in the yellow section of the error. Note that the error also indicates the type of formula where each of these references is contained (e.g. "Formula Field", "Validation Rule", etc).
To fix this error, simply reduce the number of references being made in the current field, or the other referenced fields to below the maximum limit of 15.
There are two methods to check the current number of Spanning Relationships on an Object:
000383053

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.