0% found this document useful (0 votes)
22 views9 pages

Note

Uploaded by

buingochoang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views9 pages

Note

Uploaded by

buingochoang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Process Builder

 You can reorder criteria nodes—just drag and drop them. However, you can’t change
the order of actions. After you add actions, the only way to reorder them is to delete
them and start over.
 If you create processes to replace any workflow rules, make sure you delete or
deactivate those workflow rules when you activate the equivalent processes. Otherwise,
both workflow rules and processes fire and cause unexpected results, such as
overwritten records or redundant email messages.
 You can add scheduled actions only if the process starts when a record is created, or if
the process starts when a record is created or edited and you select Yes when asked “Do
you want to execute the actions only when specified changes are made to the record?”
 A process can have up to 50 versions, but only one version of a process can be active.

Visual Workflow
Workflow
As far as what the action does, here are the different actions that you can add to a workflow rule. Each
of these actions is available as both immediate and time-dependent actions.

Email Alert—Send an email by referencing an email template. For example, email sales management
when a sales representative qualifies a large deal.

Task—Create a task. For example, assign follow-up tasks to a support representative.

Field Update—Update a field on the record that the workflow rule evaluated or a related record. For
example, when a user record is created, set the Active field to true.

Outbound Message—Send a secure, configurable API message (in XML format) to a designated listener.
For example, send a message to an external HR system to initiate the reimbursement process for an
approved expense report.
Approvals
Workflow rules can update fields on the record itself or it's related parents for an update. Never
children. Process Builder can update children!

Execution
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/
apex_triggers_order_of_execution.htm

On the server, Salesforce:


1. Loads the original record from the database or initializes the record for an upsert statement.
2. Loads the new record field values from the request and overwrites the old values.

If the request came from a standard UI edit page, Salesforce runs system validation to check the
record for:

o Compliance with layout-specific rules


o Required values at the layout level and field-definition level
o Valid field formats
o Maximum field length

When the request comes from other sources, such as an Apex application or a SOAP API call,
Salesforce validates only the foreign keys. Prior to executing a trigger, Salesforce verifies that
any custom foreign keys do not refer to the object itself.

Salesforce runs user-defined validation rules if multiline items were created, such as
quote line items and opportunity line items.

3. Executes all before triggers.


4. Runs most system validation steps again, such as verifying that all required fields have a non-
null value, and runs any user-defined validation rules. The only system validation that
Salesforce doesn't run a second time (when the request comes from a standard UI edit page) is
the enforcement of layout-specific rules.
5. Executes duplicate rules. If the duplicate rule identifies the record as a duplicate and uses the
block action, the record is not saved and no further steps, such as after triggers and workflow
rules, are taken.
6. Saves the record to the database, but doesn't commit yet.
7. Executes all after triggers.
8. Executes assignment rules.
9. Executes auto-response rules.
10. Executes workflow rules.
11. If there are workflow field updates, updates the record again.
12. If the record was updated with workflow field updates, fires before update triggers and
after update triggers one more time (and only one more time), in addition to standard
validations. Custom validation rules, duplicate rules, and escalation rules are not run again.
13. Executes processes.

If there are workflow flow triggers, executes the flows.

The pilot program for flow trigger workflow actions is closed. If you've already enabled
the pilot in your org, you can continue to create and edit flow trigger workflow actions. If
you didn't enable the pilot in your org, use the Flows action in Process Builder instead.

14. Executes escalation rules.


15. Executes entitlement rules.
16. If the record contains a roll-up summary field or is part of a cross-object workflow, performs
calculations and updates the roll-up summary field in the parent record. Parent record goes
through save procedure.
17. If the parent record is updated, and a grandparent record contains a roll-up summary field or is
part of a cross-object workflow, performs calculations and updates the roll-up summary field in
the grandparent record. Grandparent record goes through save procedure.
18. Executes Criteria Based Sharing evaluation.
19. Commits all DML operations to the database.
20. Executes post-commit logic, such as sending email.

The correct order is:

1. The original record is loaded from the database or initialized for insert.

2. The new record field values are loaded and old values are overwritten.

3. System validation rules are executed and required fields are verified.

4. All Before triggers are executed.

5. Most system validation steps are run again and validation rules are checked.

6. The record is saved to the database, but not committed.

7. All After triggers are executed.

8. Assignment rules, auto-response rules, and workflow rules are executed.

9. Records are updated again if workflow fields are updated.

10. Before and After triggers are executed again if fields are updated based on workflow
rules. (Up to 13 times.)

11. Escalation rules are executed.

12. Rollup summary formula or cross-object formula fields are updated in the parent records and
affected records are saved.

13. Repeat the same process for affected grand parent records.

14. Criteria Based Sharing evaluation is executed.

15. All DML operations are committed to the database.

16. Post-Commit logic is executed.


Sandboxs

Custom Success Messages for Quick Actions


For Create a Record, Update a Record, and Log a Call action types, you can create a custom message
that displays when the action executes successfully.

Available in: both Salesforce Classic and Lightning Experience

Available in: Group, Professional, Enterprise, Performance, Unlimited, Contact Manager,


Database.com, and Developer Editions

In Salesforce1 and Lightning Experience, when a create, update, or Log a Call action is
completed, a default success message displays, regardless of whether the action created a feed
item. If you add a custom success message to one of these actions, your custom success message
displays instead of the default message.

In Salesforce Classic, custom success messages have slightly different behavior. If you select Create Feed
Item for a Create a Record or Log a Call action, no success message displays in Salesforce Classic. The
feed item that is created is the confirmation that the action executed successfully.

You might also like