A Formula Field in Salesforce is used as a read-only field that displays its value from a formula expression you define. It is updated when any of the source fields change.
In this Salesforce tutorial, we will learn about the formula field in Salesforce. In that, I will explain what a formula field is, what its purpose is, and how to create a formula field in Salesforce.
What is a Formula Field in Salesforce?
In Salesforce, the formula field is a feature that permits you to make custom fields whose values are calculated based on particular criteria or expressions. These formula fields are used in objects, reports, and workflows.
It is a read-only field, and the user can create a formula using functions, insert operators, and insert fields. The values of the formula field can be calculated from expressions we define.
If the value in the expression we can use is updated, the formula field value is automatically updated. Now, let’s move further and see how to create the formula field type in Salesforce Lightning and Salesforce Classic.
Read Salesforce Checkbox Formula
Create Formula Field in Salesforce
Creating a formula field in Salesforce requires special attributes like editions and user permissions, and it is not available in all orgs. You can also create a formula field in the Salesforce Lightning and Classic user interfaces.
For example, we want to calculate the monthly commission of the account that is based on the annual revenue.
If the lower annual revenue gets the 0.15% commission, then the higher annual revenues get the 0.05% commission. For creating this formula we are using the formula data type that is present under the field and relationship.
1. Click on the gear icon -> Select the setup option -> Click on the object manager tab –> Select the account object.