-1

Anyone has had the requirement of updating same child records from a flow multiple times, pertaining to multiple decisions, which may or may not be mutually exclusive?

Ideally I would wish to

  1. assign whatever values they (child records) need if they satisfy decision 1
  2. assign whatever values they need if they satisfy decision 2 etc.
  3. have a single update element to update all of them

just like we do for parent (triggering) record - multiple assignment operators + one single update

But I seem to not be able to do that for child records. With the standard "Update records related to the (triggering object name) record that triggered the flow" - this is not possible to my understanding.

I am ending up with multiple updates on child records but can not think of a better way to do that. Would the following design be a better approach? We are moving out of the standard flow features by this way.

  1. querying child records into a variable
  2. running a loop with each decision (decision 1, decision 2 etc.) and assigning them accordingly
  3. one collection update of this child records list
2
  • Using a separate record collection variable is how I would solve this too
    – cropredy
    Aug 29 at 16:54
  • thank you @cropredy for confirming Aug 30 at 7:27

1 Answer 1

0

Basically, I agree with your approach as that is how I would do this. Flow Interviews are only bulkified when they reach a common element. But your premise is that there would not be a common element.

Hence,

  • use a record collection variable to cache the updates to the child records as you progress through your flow's business logic.
  • when all business logic is completed, then do an Update Records element with input being the record collection variable. This will be bulkified across Flow Interviews of the same transaction.

You must log in to answer this question.

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