I'm working a scenario where the Address of a parent record once changed shall update the address field of the child records as well.
Initially i created a process to do so and it's working fine.
What i want is to leverage Flows to do the updation of child records. If i create a helper flow with a variable to hold the ID for the parent record. I'd then pass the ID from my process to the flow and shall be able to fetch the new address field through a lookup.
But i'm stuck with fetching the child record IDs. It's not apex so can't put a system.debug and i can't use screens to see debug messages, becuase in that case it won't be autolaunch flow and i wouldn't be able to pass the parent ID from my process.
I believe i'd need to loop through each ID once i have them and then update each record.
I had been googling it for a while but not sure how to move forward.
Using process builder solves this but i'm learning flows and understanding features like looping, updation, looups would really help in automating complex scenarios.
Best Regards,
Sangram
Best Answer
Ok, here's how I would do this. You're good with passing the ID into the Flow to get what the address should be.
The Fast Lookup gets all the records and data that needs to be changed, the Loop passes each record to a handler, the Assignment changes the values in the handler, then goes back to the Loop to get a new record. It will repeat this until it runs out of records, then runs a Fast Update to push everything back up to the system. Slick, eh?