sf-Execution Order

Source: Internet
Author: User

Client: (First executed)

1. Perform javascript validation.

Server:

1. Loading data from the database for Upsert statements

2. Load new data from the client and overwrite the historical data

Standard SF page data: For system Validation, including:

A. Compliance with the rules of the page layout (different page layouts show different fields)

B. Required for page/field level

C. Whether the completed data is a valid format

D. Length limitation of the data entered

E. User-defined limits

Apex Application/soap Call: The system Validation is not performed directly to the user's own defined limits.

3. Before logic for executing trigger

4. Execute the system Validation,customer Validation again

5. Duplicate Data rules:

6. Save data to DB, but no commit.

7. After logic to execute trigger

8. Execution assignment rule (owner's distribution rules)

9. Execute SF auto Response (SF Auto response rule)

10. Enforcement of workflow rules

11. If Workflow has field update (field updates), update the historical data again

12. Perform trigger before update and after update logic (only once), and System validation will execute. Customer Validation and Duplicate rule are no longer executed.

13. Executive Processes

14. Implementation of escalation Rule

15. Implementation of Entitlement Rule

16. Update the value of the Roll up field on the parent object in Master-detail. Also, perform cross-object workflow

17. If the parent object is a detail object in Master-detail, continue executing the value of the Roll up field on its parent object,

18. Executive Criteria Based Sharing evaluation (standard data sharing rules)

19. Commit DML operations to DB

20. Perform other actions, such as sending e-mails, etc.

Reference Document: Https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_order_of_execution.htm

      

sf-Execution Order

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.