Salesforce Cross Object Formula field :- In our previous Salesforce Tutorial we have learned about how to create a formula field. In this Salesforce Tutorial we are going to learn about Salesforce Cross Object Formula field and how to create custom Salesforce Cross Object Formula field.
Salesforce Cross Object formula field displays one object data in other related object by referencing data in a related record.
Example:- If Invoice are related to another object then we can pull the fields from the another object and populate the values in Invoice. As per previous Salesforce Tutorial, Invoices are associated to Hospitals. Hospital is a parent object of Invoices. If we want to create Hospital Email address field for every Invoice record then using Salesforce Cross Object Formula field we can create Hospital Email field in Invoice record.
Formula Field is a custom field generated by system of data type Formula. It is a read-only field which means we can not edit Formula Field.
- Formula Field in a read-only field.
- Formula Field derives the value from Formula expression.
- When the source field get changed automatically the Formula field changes(Updated).
- Formula in Salesforce are used to calculate custom fields, validation rules, Flow logic etc.
- Using Formula Editor we create formula in Salesforce.
Here we are going to create Salesforce Cross Object formula field(Hospital Email Address) in Invoice Object.
Go to Setup | Build | Create | Object | Invoice | Custom Fields and Relationships | New.
Step 1 :- Creating New custom field.
Create new Custom field of Data type Formula and click on Next.
Enter Field label and Field name and select appropriate return type and click on Next button as shown above.
- Now go to Insert field => Invoice => Hospital Object => Email =>Insert.
Now click on Next button.
Now click on Next button and Save all the settings.
Now go to Invoice record and we can check the Hospital Email field is present in every Invoice record as shown below.
In this Salesforce Tutorial we have learned about What are Cross Object Formula fields and How to create custom Cross Object Formula field in Salesforce.com. In Our upcoming SFDC Training Training tutorial we are going to learn about Validation Rules in Salesforce.