Apex Execution Order
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:* Compliance with layout-specific…