0

I have a situation in which I'm using Process Builder to update a custom object (A2D) status (which I'm calling Technology_Lifecycle).

The Process Builder executes as intended, and the Technology_Lifecycle changes, as I expect it to, based on the criteria set in the Process Builder.

Secondly, I have a 'Flow' that is supposed to capture the Date/Time in relative date/time fields when the status updates.

The Flow executes accordingly and captures the date/time of a change to the Technology_Lifecycle status when that change occurs manually.

However, when the update to the Technology_Lifecycle status occurs based on the Process Builder workflow, the Flow to capture the date/time does not execute, and the date/time is not captured.

Any idea why this might happen?

Here are screenshots of the Flow.

This shows what starts the Flow (a record being created/updated, and to execute prior to save): enter image description here

This shows the outcomes that state the criteria 'when the Technology_Lifecycle status is updated to (a certain status)': enter image description here

This shows the outcome execution to update the record's date/time field, setting the date/time field to NOW() via formula: enter image description here

2
  • have you tried the option "if the condition requirements are met" instead of "Only if the record that triggered ... " in the flow ?
    – Sid
    Commented Sep 8, 2021 at 18:07
  • No, because I only want to capture the Date/Time of the point at which the record updates to the status of.. 'Authorized' for example. If I update the flow option to 'If the condition requirements are met', the date/time field will update every time an edit/update is made to that record while it's set to that status. This would not allow me to keep track of the date/time a record first changed to that status. Commented Sep 8, 2021 at 18:30

1 Answer 1

1

When you manually edit and save the "Status" field, the flow fires correctly, this means there is nothing wrong with the configuration of the flow. In your case, the process builder did not trigger the flow.

A process builder field update does not trigger a "before flow" in the same transaction. A process builder field update will only cause the before trigger, after trigger and workflow rule to re-execute.

The order of execution is the reason.

  1. Manual updates the A2D record
  2. Before Flow runs (this is prior to the process builder execution)
  3. Before and After triggers execute
  4. Workflows Execute
  5. Process Builder Executes (causing #3 and #4 to re-execute)
  6. After Insert/Update Flow executes
  7. Record is saved to the database.

Hence you can see that your flow won't execute due to process builder field update in the same transaction. If you change your flow to After Insert/Update then you will see the desired result. Please try.

Lastly, it is extremely bad practice to have multiple automation per object, mixing process builder, flow, workflow and triggers. I will recommend using only one type of automation and re-architecting this. Iff this object has triggers, then any field update logic should be made inside the triggers.

1
  • I was hoping to keep this as a 'before save' flow to save on CPU time, but it looks like that may not be possible in this situation. Thanks for the help! Updating back to a post-save flow worked. Commented Sep 9, 2021 at 12:36

You must log in to answer this question.

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