6.1 1.5 - Salesforce Fundamentals - Common Use Cases For Declarative Customization
6.1 1.5 - Salesforce Fundamentals - Common Use Cases For Declarative Customization
• Formula Fields
• Validation Rules
• Workflow Rules
• Approval Process
• Process Builder
• Visual Workflow
Copyright © Walid El Horr 2
Formula Field
• A formula is a field type that is similar to an equation that is executed/evaluated at page read time
• Depending on the context of the formula, it can make use of various data and operations to
perform the calculation
• A useful way to think about formulas is that they are similar to formulas on a spreadsheet. These
formulas can make use of data and operations to calculate a new value of some type
• A Formula Field can return: Checkbox, Currency, Date, Datetime, Number, Percent and Text
• A Percent formula example is calculating the margin based on the cost and selling price
• You can create a formula on a Object child to reference parent Object field.
• Cross-Object formula is all about getting information of Parent object into Child object.
• Fetching child Object information in parent record is not done by Formula, it is done by Rollup
Summary Fields in the case of Master Detail relationship only
• An example: Formula field on the Opportunity Object, that uses fields from the Account Object to
calculate against
• Account Rating field is on the Account object (it is based on many criteria)
• Always go to the Advanced Formula Editor (built-in functions and cross object formulas enabled
here)
• Used to summarize numeric value from a selected field in child Object records
• Rollup Summary Field will get information from the related child Object Records. Information types:
• Count
• SUM
• MIN
• MAX
• It is calculated when you WRITE the children (whenever any referenced detail record is saved)
• Opportunity Object uses a Lookup relationship to Account, but it is treated as Master-Detail relationship
• From Account, you can create a Rollup Summary Field that is used to summarize all child Opportunity
records
• When creating the Master Detail Field, you can use filters to only pull value from specific Records.
For example, only include information from Opportunities that are Closed/Won
• Validation Rules is not used to replace the Required Field option in Field
Level Security or page Layout, but for specific scenarios based on values
from other fields
• Error message can be displayed at the top of the page or next to the field
that failed the validation rule
• Validation rules will impact API usage (ex. Data Loader), web-to-lead, and
web-to-case submissions.
• Make sure to structure your validation rules so that they will not
unintentionally interfere with these operations (such as rejecting a web-
to-lead submission or Data Loader).
• So, in some scenarios, you may need to disable validation rules when
importing or updating data, and reinstate them afterwards
• Workflow Rules
• Approval Process
• Process Builder
• Visual Workflow
11
Declarative Automation Tools
How to Start When it Runs What it is for
- Update Fields
- record itself
- Record Create - Immediately - parent objet - master-detail ONLY
Workflow Rules
- Record Update - Delayed Time Based - Create a Task
- Send Email
- Send Outbound Message
- Button - Update Fields
- Link - record itself
- Called from Process Builder (that includes a - parent objet - master-detail ONLY
Approval Process “Submit for Approval” action) - Immediately
- Create a Task
- Called from Visual Workflow (that includes a
“Submit for Approval” action) - Send Email
• Formula Field: a read-only field used to calculate other field values from the same record, or from Parent Object
records. It can have these types - Checkbox, Currency, Date, Datetime, Number, Percent and Text
• Rollup Summary Field: a read-only field used to calculate child Object records count, sum, min or max in a
Master-Detail relationship only
• Validation Rules: used to enforce conditional requirements on fields to ensure clean and accurate data entry
• Workflow Rules: automation tool that is invoked on record creation or update. It can update fields on the record
itself, or its parent (MD only), create a task, send an email or send an outbound message.
• Approval Process: automated approval tool that is invoked by a button link, Process, Flow or Apex code. It can
update fields on the record itself, or its parent (MD only), create a task, send an email or send an outbound
message.
• Process Builder: automation tool that is invoked on record creation or update, or by another Process. It can
update fields on any related record, create a record, post to chatter, invoke a process, a Flow, and Approval…etc
• Visual workflow: automated approval tool that is invoked by a button link, Process or Apex code. It can accept
User Input, Create and Delete records…etc.