Activity Forums Salesforce® Discussions Why does validation rule not work when we update workflow field?

  • Anurag

    August 13, 2018 at 2:10 pm

    Hi Madhulika,

    Validation Rules fire before workflow rules, so the record has to meet the validation rule criteria before the workflows get a chance to run.

  • shariq

    September 17, 2018 at 11:18 pm


    To add into this -

    Salesforce runs user-defined validation rules if multiline items were created, such as quote line items and opportunity line items.

    • Executes all before triggers.
    • 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. The only system validation that Salesforce doesn't run a second time (when the request comes from a standard UI edit page) is the enforcement of layout-specific rules.
    • Executes duplicate rules. If the duplicate rule identifies the record as a duplicate and uses the block action, the record is not saved and no further steps, such as after triggers and workflow rules, are taken.
    • Saves the record to the database, but doesn't commit yet.
    • Executes all after triggers.
    • Executes assignment rules.
    • Executes auto-response rules.
    • Executes workflow rules.
    • If there are workflow field updates, updates the record again.
    • If the record was updated with workflow field updates, fires before update triggers and after update triggers one more time (and only one more time), in addition to standard validations. Custom validation rules, duplicate rules, and escalation rules are not run again.
    • Executes processes.

    Hope this helps.

  • Jaime

    June 15, 2021 at 11:14 am

    I know this post is out of date, but I wonder if on insert, if workflow makes a field update, the trigger considers that an update instead of an insert. I guess not as for example, to be an update, trigger old is required.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos