Get tips for working with merge fields in your formulas. Learn how to reference
cross-object merge fields, work with person and business accounts, and more. Plus, find guidance
on using a special merge field to reference the unique identifier for your Salesforce org in a
formula.
Required Editions
Available in: both Salesforce Classic and Lightning Experience
Available in: All Editions
Delegated administrators need to have access to custom objects to access the objects’
merge fields from formulas.
In account formulas, all business account fields are available as merge fields. However,
account fields exclusive to person accounts such as Birthdate and Email are not
available.
You can’t use formula fields that include related object merge fields in roll-up summary
fields.
Formulas and roll-up summary fields can’t reference fields on external objects.
Using RecordType.Id can make your formula less readable; when you do
use it, write in-line comments into the formula to clarify.
To reference the unique identifier for your Salesforce organization in a formula, insert
the $Organization.Id merge field. This merge field can display
anywhere formula fields can except in reports.
Some merge fields display as radio buttons but function like picklist fields when
referenced in a formula.
Use the values “Read,” “Edit,” and “None” in a formula when
referencing:
$UserRole.CaseAccessForAccountOwner
$UserRole.OpportunityAccessForAccountOwner
CaseAccessLevel (on Territory)
OpportunityAccessLevel (on Territory)
Use the values “Read,” “Edit,” and “All” in a formula when referencing:
AccountAccessLevel (on Territory)
If you create a contacts formula field that references account merge fields, that field
can be included in contact page layouts but should not be included in person accounts page
layouts. The formula field will display a value of #Error on the person
accounts page.
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
Always Active
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
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
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.