6

I have an approval process which is fired when a record hits certain criteria.

This works correctly, but when the approval process is "approved" or "rejected", my next process builder doesn't fire.

Approval process

Specifically, I expect my process builder to fire with the field updates on final approval and final rejection (see process builder below):

Process builder conditions

However nothing is happening! If I manually change the status of the supplier to "Published" from something else, then the process builder fires and the record updates as it should.

Why would it not do so if the "Publish State" is changed through an approval process and a workflow?

Many thanks

3 Answers 3

25

When you edit a "field update" action of an Approval Process, the checkbox Re-evaluate Workflow Rules After Field Change needs to be checked in order to have all workflows to be run and evaluated again after the "field update" rules in the approval process are applied.

This will cause also the flows set in the process builder to run again.

Please refer to the Salesforce docs to find additional information.

1
  • 2
    I had the same problem and this worked for me! Thanks for posting! Commented Feb 1, 2017 at 17:30
1

Note that as of Spring '22, Flow can directly trigger off of a field update from an Approval Process, and this is the recommended approach.

1
  • +1 Alex -- what a delightful service to the Community by you to add this (and the other answers) - us old hands tend to remember the restrictions and forget they've been lifted in later releases
    – cropredy
    Commented Dec 22, 2021 at 5:33
-1

I believe that you are hitting an order of execution error here. What Shane is saying could potentially resolve the problem depending on when this is getting assigned.

If you are doing a field update inside of a workflow that field update does not happen until after all the workflow criterias and process builder actions take place. What you have to be careful about is having the process builder rely on a field being updated by a workflow inside of that same execution context. The object will not receive that update (populate with your assigned value) until AFTER the process builder checks have run. This causes your checks to fail inside of the process builder. I believe all workflow and process builder field updates are grouped to happen after they execute. I am, however, unsure if selecting re-evaluate will tell that process builder to run again after the field updates have happened. If this is true then what Shane proposes should resolve the issue but this is the underlying cause of why you are seeing this happen. As a general rule, I do not create process builder actions that require a workflow to assign a value in the SAME execution context.

I use this list below as a reference when I am making workflows or process builder actions.

1.The new record field values are loaded from the request and overwrite the old values

2.All before triggers execute

3.System validation occurs, such as verifying that all required fields have a non-null value, and running any user-defined validation rules

4. The record is saved to the database, but not yet committed

5. All after triggers execute

6. Assignment rules execute

7. Auto-response rules execute

8. Workflow rules execute

9. Processes

10. If there are workflow field updates, the record is updated again

11. If the record was updated with workflow field updates, before and after triggers fire one more time (and only one more time)

12. Escalation rules execute

13. Parent rollup summary formula

14. All DML operations are committed to the database

15. Post-commit logic executes, such as sending email

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .