In the Salesforce tutorial, I will explain how to create cross-object formula fields in Salesforce. This can be created on both Salesforce Lightning and Salesforce Classic editions.
Humana is a Louisville-based company and it has two objects and both of these objects are related to each other. The first object has one side of the relationship and the second object has many sides of the relationship.
We create cross-object formula fields whenever we want. The first object record fields are to be visible on the object’s second record.
So, here we will discuss these topics in this Salesforce tutorial:
- What are the cross-object formula fields in Salesforce
- How to create the cross-object formula fields in Salesforce
- How to create the cross-object formula fields in Salesforce lightning
- How to create the cross-object formula fields in Salesforce Classic
What are the cross-object formula fields in Salesforce
The Salesforce cross-formula field is a formula that reaches two related objects and an instance of merge fields on those objects.
A cross-object formula can be recommended to merge the field from the parent object if the object is on the particular side of the master-detail relationship. It can also work with the lookup relationships.
So, with this, we have learned What are the cross-object formula fields in Salesforce are, and further, we will discuss how to create the cross-object formula field in Salesforce.
Read: How to a Create Custom Field in Salesforce
How to create the cross-object formula fields in Salesforce
Here we will discuss the tips for creating or building cross-formula fields in Salesforce.
- For every object in cross object formula salesforce permits the highest of ten unique relationships.
- In the roll-up summary field, we can not recommend the cross-object formulas.
- In the cross-object formula can be recommended to merge the field from the parent object if the object is on the particular side of the master-detail relationship.
- We can not recommend fields from accounts through personal accounts in the cross-object formula.
- It recommended the currency field that turns the value into the currency of the record that can hold the formula.
- The first object has one side of the relationship and the second object has many sides of the relationship.
- We build the cross-object formula fields whenever we want. The first object record fields are to be visible on the object’s second record.
Now, let’s move ahead and see how to create the cross-object formula in Salesforce. We will explore both the salesforce experiences: Salesforce lightning and Salesforce Classic.
How to create the cross-object formula fields in Salesforce lightning
Here we are creating the cross-object formula field on the contact object which will refer to the website field on the account object.
If you want to learn how to create the cross-object formula fields in Salesforce lightning follow these steps:
Step-1: Firstly click on the App Launcher then enter the sales in the search box and click on the sales.

Step-2: After clicking on the sales, the sales home page is open. Here click on the accounts object.

Step-3: After clicking on the account object scroll to the bottom and you can see the contacts under the account. The two contacts are present one is Linwood Dibbert and the second is Jack Rogers.

Step-4: After clicking on one of the contacts you can see that there is no field of account website. Now apply the cross-object formula field on the contact object which will refer to the website field on the account object and after applying the cross-object formula the website field is shown in the contact details.

Step-5: Go to the setup, click on the object manager after that enter the contact in the search box, and then click on the contact objects.

Step-6: After selecting the object the contact page is open then click on the field and relationship that is present in the left sidebar.

Step-7: After clicking on the field and relationship option, the field and relationship page is open then click on the new button.

Step-8: After clicking on the new option choose the field data type. Here we are selecting the formula field data type and then click on the next option.

Step-9: After choosing the formula data type, choose the output type. First field the label and then the field name is automatically fielded after that choose the formula return type. Here we are selecting the text formula return field.

Step-10: After choosing the text field, insert the formula by clicking on the insert field option then select the account then select the website and click on the insert option.

Step-11: After clicking on the insert option you can see that our formula is inserted now check whether the formula is correct or not.

Step-12: After inserting the field now click on the check syntax option this will show us whether our inserted formula is correct or not. then check the treat blank fields as a blank option after that click on the next option.

Step-13: After clicking next check the field level security and set it according to you then click on the next option and then add to page layouts after that click on the save option.

Step-14: After clicking on the save option, again go to the account object click on it then select the Burlington textile corp of America record. Under the record, there is a contacts section inside this section two contacts are present. Click on one of the contacts.

Step-15: Here we are clicking on the Lindwood Dibbert contact under this contact we can see that the account website is present. Our cross-object formula field is created.

So, with this, we have learned how to create the cross-object formula fields in salesforce lightning.
How to create the cross-object formula fields in Salesforce Classic
Here we are creating the cross-object formula field on the contact object which will refer to the account number field on the account object.
If you want to learn how to create the cross-object formula fields in Salesforce classic follow these steps:
Step-1: Firstly, click on the setup and then click on the accounts object that is present in the nav bar, and after that click on the Burlington Textiles Corp of America record.

Step-2: After clicking on the account object record scroll to the bottom and you can see the contacts under the account record. The two contacts are present one is Linwood Dibbert and the second is Jack Rogers.

Step-3: After clicking on one of the contacts you can see that there is no field as the account number. Now apply the cross-object formula field on the contact object which will refer to the account number field on the account object after applying the cross-object formula the account number field is shown in the contact details.

Step-4: Again go to setup, and enter the contacts object in the Quick Find Box you can see that the contact object is present under the customize app click on the drop-down arrow of the contact object and then click on the fields that are present under the contact object.

Step-5: After clicking on the field, the contact custom fields page is open scroll to the bottom of the page and you can see the contact custom fields and relationships label beside this label, there is a new option click on the new button.

Step-6: After clicking on the new option choose the field data type. Here we are selecting the formula field data type and then click on the next option.

Step-7: After choosing the formula data type, choose the output type. First field the label and then the field name is automatically fielded after that choose the formula return type. Here we are selecting the text formula return field.

Step-8: After choosing the text field, insert the formula by clicking on the insert field option then select the account then select the account number and click on the insert option.

Step-9: After inserting the field now click on the check syntax option this will show us whether our inserted formula is correct or not. then check the treat blank fields as a blank option after that click on the next option.

Step-10: After clicking next check the field level security and set it according to you then click on the next option and then add to page layouts after that click on the save option.

Step-11: After clicking on the save option, again go to the account object click on it then select the Burlington textile corp of America record. Under the record, there is a contacts section inside this section two contacts are present. Click on one of the contacts.
Here we are clicking on the Lindwood Dibbert contact under this contact we can see that the account website is present. Our cross-object formula field is created.

This is how we can understand how to create the cross-object formula fields in salesforce classic.
Also, check : How to Create a Junction Object in Salesforce
Conclusion
In this Salesforce tutorial, we have learned how to create the cross-object formula fields in salesforce. This can be performed on both salesforce lightning and salesforce classic.
- What are the cross-object formula fields in Salesforce
- How to create the cross-object formula fields in Salesforce
- How to create the cross-object formula fields in Salesforce lightning
- How to create the cross-object formula fields in Salesforce Classic
You may also like to read the following Salesforce tutorials.
- How to Add Validation Rule for Text Field in Salesforce
- How to delete custom objects in salesforce
- How to remove new event button from case object in salesforce
- How to Create Lookup Filter in Salesforce
- How to add Bucket Field in Salesforce
- How to add Picklist Values in Salesforce
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.