Activity › Forums › Salesforce® Discussions › Why does validation rule not work when we update workflow field?
Tagged: Activate Validation Rule, Deactivate Validation Rule, Standard Workflow, Validation Error, Validation Rules, Workflow Field, Workflow Rule
-
Why does validation rule not work when we update workflow field?
Posted by madhulika shah on July 4, 2018 at 8:18 AMWhy does validation rule not work when we update workflow field?
Jaime replied 4 years, 11 months ago 4 Members · 3 Replies -
3 Replies
-
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.
- [adinserter block='9']
-
Hi,
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.
-
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.