Loading
Important Advisory: iOS Update Impacting CG Mobile ApplicationRead More
Extend Salesforce with Clicks, Not Code
Tips for Using Merge Fields in Formulas

Tips for Using Merge Fields in Formulas

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.
 
Loading
Salesforce Help | Article