Many areas in Salesforce use formulas. Before you begin using formulas, review the differences in their uses.
Required Editions
| Available in: both Salesforce Classic and Lightning Experience |
|
Available in: All Editions Reports and Approvals are not available in Database.com |
| Use Formulas for: | To: |
|---|---|
| Approval Processes | Define the criteria a record must meet to enter the approval process. |
| Approval Steps | Define the criteria a record must meet to enter the approval step. |
| Assignment Rules for Leads and Cases | Define the criteria the lead or case must meet for it to be assigned. |
| Auto-Response Rules for Leads and Cases | Define the criteria a lead or case must meet to trigger an auto-response rule. |
| Case Escalation Rules | Specify criteria a case must meet for it to be escalated. |
| Custom Buttons and Links | Define the content for custom links and buttons. |
| Custom Fields | Create custom formula fields that automatically calculate a value based on other values, merge fields, or expressions. Users can view formula fields on record detail pages but can’t see the underlying algorithm or edit the value of a formula field.Custom formula fields are not available in Connect Offline, Web-to-Lead forms, or Web-to-Case forms. |
| Custom Summary Formulas in Reports | Automatically calculate more totals based on existing report summaries using the values, merge fields, or expressions you specify. Users can’t change these totals. |
| Data Validations | Verify that the data a user enters in a record meets the standards you specify before
the user can save the record. A validation rule can include a formula such as CloseDate >= TODAY(). |
| Default Field Values |
Apply a value to a custom field when a user creates a record. Use formulas to define a
default value such as Users can change a default value. Default field values can be based on a formula using values, merge fields, or expressions you specify. |
| Escalation Rules | Define the criteria that a case must meet to be escalated. |
| Formula Fields | Automatically calculate the value of a custom field using the values, merge fields, or expressions you specify. Users can’t change the value of a formula field. |
| Reports | Create custom summary formulas in your reports to calculate more totals based on the existing summaries in that report. |
| S-Controls | Define the content for s-controls. |
| Validation Rules | Prevent users from entering an invalid value in a standard or custom field. Validation rules can be based on formulas and display an error message to users when the value they enter is not valid. |
| Workflow Field Updates | Automatically change the value of a field to a value you specify. The formula can include other values, merge fields, or expressions. You can set field updates to occur as a result of a workflow rule or an approval process. |
| Workflow Rules | Define the criteria a record must meet to trigger a workflow rule. |
| Visualforce Pages | Define the content for Visualforce pages. |
Common Formula Processes
| When are they executed? | Read only? | Can include functions? | Can specify null handling? | Can include references to parent merge fields? | |
|---|---|---|---|---|---|
| Default Field Values | Record creation | No | Yes | No | No |
| Formula Fields | Record display | Yes | Yes | Yes | Yes |
| Validation Rules | Record save | Not applicable | Yes | No | Yes |
| Workflow Rules | Record save | Not applicable | Yes | No | Yes |
| Approval Processes | Record submitted for approval | Not applicable | Yes | No | Yes |
| Field Updates | Workflow or approval process | Not applicable | Yes | No | Yes |
| Custom Summary Formulas for Reports | Report display | Yes | Yes, a limited subset of functions | Yes | No |