I was working as a Salesforce admin on a sales application. Recently, the sales manager asked me to add a field to the contact object so that it would fetch the value of the amount field from the account object and display it on all related contacts of that particular account.
To achieve this requirement, I created a cross-object formula on the contact object that displays the annual revenue amount from the associated account.
Here, I will explain the cross-object formula in Salesforce and how to create a cross-object formula field in Salesforce with an example and step-by-step explanation.
Cross-Object Formula Field in Salesforce
In Salesforce, a cross-object formula field allows you to automatically calculate and display data from multiple related objects within the formula field. It acts as a bridge, pulling information from other objects and presenting it within the current object you’re working with.
Using the cross-object formula field, we can retrieve fields of objects and display them on the related object, known as a cross-object formula.
To create the cross-object formula field, there should be a Master-Detail Relationship or Lookup Relationship between two objects.
Things to Remember
- You can create a cross-object formula that references fields from parent objects. That means we can create an object on Chile’s side only. For example, we can fetch from an account to the contacts.
- We can only follow up to 10 relationships away from fields to fetch the data from the parent object.
- The cross-object formula is always in the read-only form. We cannot edit them.
- The cross-object formula follows the field-level security and sharing setting rule. If a user doesn’t have permission to access the field of the parent object, then they won’t be able to access the cross-object formula field either.
Create Cross-Object Formula Field in Salesforce
Here, we will explain how we can display the annual revenue field value from the account object to the related records of the contact object in Salesforce. Using the following steps, we can create a cross-object formula field in Salesforce.
- As per our example, we need to display the annual revenue field value from the Account object to the Contact object.
- For that, go to the Setup. -> Object Manager. -> Click on the Contact Object.

- Click on the Field & Relationships. Then, click on the New option.


- Enter the Field Label, as we are displaying the amount field value to the contact, so I have entered ‘Account Amount.’ The Field Name will automatically populate.
- Then, select the Formula Return Type that matches the desired output if you use the Currency data type field in the parent object. Then, it would be best to select the currency data type in this object.

- Now, click on Advanced Formula. In the Formula Editor, click on the Insert Field option. Then navigate to the Annual Revenue field on Account Object, as displayed in the following Image, and click the Insert button.

- Click Check Syntax to check whether the formula is correct. We cannot proceed to the next step if there is any error.

- Then, check the Treat Blanks Fields as Zeroes option to handle the null fields, and click the Next button.

- Set up the Field-Level Security so that only selected profile users can access this created field, and the formula field is always read-only. Then click the Next button to proceed and select the Page Layout on which you want to display this cross-object formula field.
After that, click on the Save option.

- As you click the save button, you will see in the fields and relationships that the cross-object formula field has been created with the label you entered and the data type.

- Now, navigate to the Contact Object to check how the formula field works. As you open any contact record with the account name field filled with a value, you will see the formula field displaying the amount, the same as the annual revenue field from the account object.

This way, we can use the cross-object formula field in Salesforce to fetch the values of the parent fields in the child.
Conclusion
I hope you have an idea about the cross-object formula in Salesforce. I explained what an object formula is and then, using the example, demonstrated how to create a cross-object formula field in Salesforce with a step-by-step explanation.
After creating the cross-object formula, we can fetch the parent data in the child object to provide users with more transparency.
You may also like to read the following Salesforce tutorials.
- Add Cross Filters in Salesforce Report
- Text Formula Field Salesforce
- Formula Field in Salesforce
- Salesforce Formula Field to Calculate Age
- Salesforce Formula Field to Check Null Values for Dates
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.