0

I set up a master record-triggered flow and the trigger is when a record is updated or created. I have two subflows. In one subflow I want to pass updated records, and in the other subflow I want to pass newly created records. For the first subflow, I can easily check any Record_Prior's field and compare it to Record's field and know that the record was updated. However for the second subflow, how do I filter for only newly created records? I tried to add a Decision element to check if Record_Prior.Id is null, but that did not work. What is one way to filter for created records only (NOT updated records)?

3
  • 1
    Did you try using the ISNEW() formula?
    – Diego
    Commented May 12, 2022 at 12:20
  • @kris goncalves that didn't work in my case. The createddate 'is changed' check did not work in a Decision element. The solution referenced instructs to put the 'is changed' check in the entry (Start) condition, but I need to have no conditions in the Start element.
    – Jay
    Commented May 12, 2022 at 13:04
  • @diego YES it worked! Here's what I did - I created a new formula resource (boolean). The body of this formula is just ISNEW(). Then in a Decision element I evaluated if this resource equals true and Voilà!
    – Jay
    Commented May 12, 2022 at 13:17

1 Answer 1

0

You could potentially use an input variable in the subflow that you set from the main flow to store the id's of any new records identified in the main flow, then check for matching id's in the subflow.

2
  • How would I make the main flow identify new records? Currently any record that is either created or updated enters the main flow since the trigger criteria is when a record is updated or created.
    – Jay
    Commented May 11, 2022 at 23:50
  • I have not used this myself yet, but I believe record triggered flow support ISNEW() - help.salesforce.com/s/…
    – Luke BDD
    Commented May 13, 2022 at 0:04

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