Skip to main content

Posts

Showing posts from February, 2021

Order of Execution of a record in Salesforce Database

Loads the original record from the database or initializes the record for an upsert statement. 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: Compliance with layout-specific rules Required values at the layout level and field-definition level Valid field formats 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. Before 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. Executes record-triggered flows that are configured to run before the record is saved. Executes all before triggers. Runs most system validation steps again, such as verifying that all required...