Skip to content
Home » News and articles » Cross-Object Formulas in Salesforce

Cross-Object Formulas in Salesforce

What is a Cross-Object Formula?

A cross-object formula in Salesforce allows you to reference and display fields from a related object. For example, you can show the Revenue_this_FY__c field from an Account (our custom made automation, which we have created in our Salesforce org) on related Opportunities, Contacts, or Cases. This makes it easier to work with data from different objects in a single view.

When to use a Cross-Object Formula?

  • Displaying Parent Information on a Child Object – Example: Display the Revenue_this_FY__c value from an Account on a Contact or Opportunity.
  • Enabling Conditional Logic Based on Parent Data – Example: Flagging high-value Opportunities if the Account’s Revenue_this_FY__c exceeds a specific threshold.
  • Creating Dynamic Calculations – Example: Calculating an Opportunity’s potential contribution as a percentage of the Account’s revenue.

Steps to Create a Cross-Object Formula

Go to the Object Manager

  • Navigate to SetupObject Manager and select the child object where you want to create the formula (let’s create it on the Opportunity object).
Object manager in Salesforce

Create a New Formula Field

  • Click Fields & RelationshipsNew.
  • Select Formula as the data type.
New formula field in Salesforce

Name and Select Return Type

  • Enter a Field Label (e.g., “Account Revenue This FY”) – field API will auto-populate.
  • Choose the appropriate Field Type (e.g., Currency).

Build the Formula

  • Use the Insert Field button to reference the Revenue_this_FY__c field from the parent Account object:

    Set Field-Level Security

    • Decide which profiles should see this field, then click Next.
    Salesforce field level security

    Add to Page Layouts

    • Choose where the field should appear, then save.

    rom now on, the Account’s revenue is visible on every single Opportunity. We can expand this functionality with additional formulas; for example

    Scenario: Mark Opportunities as “High Potential” if the Account’s revenue exceeds £500,000:

    Scenario: Calculate how much an Opportunity contributes to the Account’s total revenue in %: