[SalesForce] Process Builder – Flow – Run After Record Is (Actually) Saved (Committed)

Is there a way using a Flow (Process Builder directly, if possible) to do something on a record AFTER it is COMMITTED?

To be clear:   literally at the end of the standard Order Of Execution (doesn't have to be "before" the "post-commit logic").

I'm trying to circumvent issues with managed packages (mainly Rootstock) where when an Account is created (and the RS Customer checkbox is true), it creates a RS Customer record at the same time, and I cannot interact (such as pushing the ID of the RS Customer record to the Account) due to Order Of Execution and Rootstock's (hidden) Apex, using Workflows or Process Builder.

I can't help but think a Flow might do the trick, but I've not figured it out yet.

  • START
  • When NEW record 'objA' is inserted
    • NEW record 'objB' is inserted
    • 'objB' has LOOKUP to 'objA'
  • WAIT for record 'objA' (and 'objB'??) to COMMIT
  • Copy a value from 'objB' record to 'objA'
  • END

The Process Builder to copy a value from 'objB' record to 'objA' record works fine normally – "child, write a value to parent record".

Best Answer

Create a time-based flow in Process Builder that runs "one hour before Created Date". This causes the step to be queued immediately, and it should fire very quickly (brief tests show 1-2 minutes in a Sandbox).

enter image description here


Original Answer:   What you can do is build a Process build or workflow with a time-based workflow of -1 hour of create. This will wait till all jobs are executed and add this process to the queue for the first available time to execute.

Related Topic