-2

If all child records have a picklist value of Authorized, then update parent record to Pay Request; if not all child records have the same picklist value of Authorized, then update parent record to Partial Pay Request.

I have a flow but it's not working -- Im trying to determine if I should use (A) a record triggered flow on child object when picklist status is Authorized, then loop through all child records associated with a parent record and update parent record accordingly. Or, (B) create record triggered flow on parent object, get all child records and loop through child records to determine if status is in fact authorized for every child record, then I am not sure where to go -- if all child records are authorized, then parent status needs to update to one specific status; if not all child records are authorized, then parent record needs to update to a different status.

1 Answer 1

1

Your parent object isn't going to undergo a save procedure when a child record changes unless either of these things are true

  1. Your two objects are part of an M-D relationship and you have a rollup summary field on the parent
  2. You have some other code/flow that causes an update to happen on the parent (when a change occurs on the children)

So the short answer here is that your flow needs to be on the child object. You need to consider which way information is flowing here. The value on the parent depends on the values of the children in your scenario, and not the other way around. If one of the children's values change, then the parent might need to change. If the parent changes, that doesn't affect the value on the children.

Automation/code goes on the thing that initiates the change.

2
  • The two objects are in fact part of an M-D relationship and there is a rollup summary field on the parent Commented Aug 10, 2023 at 19:32
  • the flow needs to check ALL child records of a parent though, is this possible if triggering from the child object? for example, if all child records of a parent have a status of authorize, then update parent record status to x; if not all child records have a status of authorize, then update parent record status to y. Commented Sep 18, 2023 at 14:02

You must log in to answer this question.