0

In which order does Salesforce execute events upon saving a record?

  1. Before Triggers; Validation Rules; After Triggers; Assignment Rules; Workflow Rules; Commit

OR

  1. Validation Rules; Before Triggers; After Triggers; Assignment Rules; Workflow Rules; Commit

As per the order of execution of salesforce events, standard validation rules are executed, followed by Before Triggers and then custom validation rules, so I am not sure which one among these is correct.

5

There is a distinction between standard validation rules (number fields must be numbers, etc) and custom validation rules (discount > 20)

Triggers need to have valid sobjects passed to them, hence data scrubbing is done by SFDC prior to before trigger execution. Since before triggers can modify the sobject, the custom validation rules need to execute after the before trigger has completed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.