Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the execution order of Salesforce?

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

Most people do not understand the knowledge points of this article "what is the order of implementation of Salesforce?", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "what is the order of implementation of Salesforce" article.

When we save records with insert, update, or update insert statements, Salesforce can execute the following events in turn.

Note: before Salesforce executes these events on the server, the browser runs JavaScript to verify that any records contain any dependent list fields. Verify that each dependency list field limits its available values. No other authentication occurs on the client.

Execution order:

1. Load the original record from the database or initialize a record for updating the insert (upsert) statement.

two。 Load the field values of the new record from the request and overwrite the old values.

If the request comes from a standard UI (user interface) editing page, Salesforce runs system validation to check that the record meets the following rules:

Conform to the specific rules of layout

Whether the level of the layout and field definition is the value of the force required

Valid field format

Maximum field length

Note: salesforce does not perform system verification in this step when the request comes from another resource (such as from an Apex application or SOAP API call.)

3. Execute all before triggers.

4. Run most of the system verification steps again, such as verifying that all required fields do not have a non-null value, and run all user-defined validation rules (validation rule).

5. Save the record to the database without committing the transaction (commit).

6. Execute all after triggers.

7. Execute the allocation rule (assignment rules).

8. Execute the automatic response rule (auto-response rules).

9. Implement workflow rules.

10. If a workflow updates some fields, update the record.

11. If the record is updated when the workflow update field is worth it, the before update and after updata triggers are triggered again (only again), and standard validation rules are also enforced (custom validation rules are not enforced).

twelve。 If there is a workflow process trigger (workflow flow triggers), execute the flow (flow).

13. Execute the upgrade rules.

14. If the record contains a rolled up summary field (rollup summary), or is part of a cross-object workflow, perform the calculation and update the parent record roll up summary field (rollup summary). The parent record is saved by the program.

15. If the parent record is updated and the grandparent record contains a rolled up summary field (rollup summary), or as part of a cross-object workflow, perform the calculation and update the parent record roll up summary field (rollup summary). A program in which grandparents' records are saved.

16. Implement sharing-based evaluation criteria.

17. Require all DML operations to the database, that is, transaction commit (that is, the real commit, of course, rollback if there is an Error).

18. Perform the logic of post-commit, such as sending e-mail (send email).

In order to make it easier for friends to understand, I would like to attach a formula:

The background of the page is two different.

Layout rules are the top priority

Format length and required.

Before Before Trigger triggers

Only foreign keys will be checked in the background.

There are exceptions to bulk insertion

Verification rules are checked in advance.

Verify after Before

Custom rules and required

The system rules twice.

Run to weight after verification.

Deposit in DB will not be submitted.

After After Trigger is triggered

Assign / reply / Workflow

If the field is updated

Verify / remove redo no longer

Trigger only runs one more time.

PB/Flow runs in turn

Data operation from scratch

The Case rules follow.

The parent table summary is counted at this time.

Workflow changes the parent table

Shared rules are recalculated.

After the data DB is submitted

Follow-up mail will be sent.

The above is about the content of this article "what is the execution order of Salesforce". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report