Tips for Using Merge Fields in Formulas | Salesforce
Tips for Using Merge Fields in Formulas
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 determine if a record is a task or event, use the IsTask merge field. For example:
IF(IsTask, "This is a task", "This is an event")
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:
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.