The Formula field

Formula fields in Salesforce are a special type of read-only fields that evaluate the specific equation at runtime and generate values accordingly. These fields are generally used where the data is entered by the user in a field and that data needs some logical processing and storage in another field. We need to define a formula expression/equation that will be executed while a record is being saved.

Let's start with an example. The event company Appiuss wants to calculate the age of the participants while they are registering for an event, depending on the date of birth the registrant entered at the time of registration. Additionally, they want to show it as a read-only field.

In order to fulfill this requirement, you can follow ...

Get Salesforce.com Customization Handbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.