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.Salesforce runs user-defined validation rules if multiline items were created, such as quote line items and opportunity line items. Before executing a trigger, Salesforce verifies that any custom foreign keys do not refer to the object itself. When the request comes from other sources, such as an Apex application or a SOAP API call, Salesforce validates only the foreign keys. Required values at the layout level and field-definition level.If the request came from a standard UI edit page, Salesforce runs system validation to check the record for: Loads the new record field values from the request and overwrites the old values.Loads the original record from the database or initializes the record for an upsert statement.Here is an order of execution in salesforce in more detail: On the salesforce server, Executes post-commit logic, such as sending email.Commits all DML operations to the database.Executes Criteria Based Sharing evaluation.Grandparent record goes through save procedure. 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.Parent record goes through save procedure. 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.Executes record-triggered flows that are configured to run after the record is saved.Executes processes and flows launched via processes and flow trigger workflow actions.
Custom validation rules, flows, duplicate rules, processes, and escalation rules are not run again.
Executes workflow rules. If there are workflow field updates, updates the record again.Saves the record to the database, but doesn’t commit yet.Executes record-triggered flows that are configured to run before the record is saved.The original record is loaded from the database.Here is an order of execution in salesforce