1

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".

1

1 Answer 1

1

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.

6
  • Interesting. -1 hour? Really? I guess I will have to try this. Thanks.
    – AMM
    Mar 3, 2017 at 16:32
  • "-1 hours" as a scheduled action (from Created Date or "from now") = "Invalid value" unfortunately
    – AMM
    Mar 3, 2017 at 16:42
  • In a vaguely similar Question, someone suggested a Formula DateTime field that equals "Date - 60 min".... that may work in this scenario..... playing with that now.
    – AMM
    Mar 3, 2017 at 16:43
  • Fascinating. It "worked". It took about 2 minutes to come in. I'm going to make the Formula-Date 90 minutes back and see if that improves speed. I do realize it's in a queue, but this is Sandbox and very little is happening. I ALSO notice there is a "before" timer option, so I may be able to just use Created Date "Before" 1 hour ago...
    – AMM
    Mar 3, 2017 at 16:58
  • 1
    Glad to see that it may work for you! Cheers.
    – Fifedog
    Mar 3, 2017 at 19:51

You must log in to answer this question.

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