function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rajesh Singh 88Rajesh Singh 88 

update child records field based upon parent record field data using flows

I am new to Flows and having a hard time to implement the logic I am working on. I have a requirement to update the child records(object : Group Segment) picklist field to Status : 'Completed' when the parent record(object : Case) Status is 'Closed' using Flows.
Can someone please guide/help me on this.
Best Answer chosen by Rajesh Singh 88
Maharajan CMaharajan C
Final Flow Screen will be:

User-added image


Rajesh one challange is here in Record Trigger Flow we don't have the option to check whether the Case Staus ISCHANGED or Not once the case got closed. We have this feature in Spring 21. 
https://releasenotes.docs.salesforce.com/en-us/spring21/release-notes/rn_forcecom_flow_fbuilder_prior_values_flow.htm
https://www.salesforce.com/form/signup/prerelease-spring21/


Also refer the below blog, Where we have the same scenario but Account and Contacts. I got this blog after i have finished the above flow in my dev org. Since my reply got delayed here.
https://www.accidentalcodersf.com/2020/12/prior-value-in-record-triggered-flow.html

Thanks,
Maharajan.C

All Answers

ShirishaShirisha (Salesforce Developers) 
Hi Rajesh,

Greetings!

You can achieve this using the Process builder alone as well.If you have requirement to achieve the same by building the flow then you can refer the sample flow given in the link:

https://forcepanda.wordpress.com/2018/10/21/update-multiple-child-records-at-once-using-visual-flow/

If you change your mind to use process builder then refer the sample prcess builder:https://force-base.com/2016/10/02/process-builder-update-child-records-based-on-changes-in-the-parent-record/

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
Rajesh Singh 88Rajesh Singh 88
Hi Shirisha,

Thanks for the suggestions!

Actually I don't have a option to go with Process Builder/Apex otherwise it would have been straight for me to implement.
I have to go with After Save Update flow for my requirement.

Regards,
Rajesh 
Maharajan CMaharajan C
Hi Rajesh,

Please follow the below screenshots:

Setup -> Flows -> Record-Triggered Flow

1.  Start Element : We will choose the Record Triggered Flow of type After Update and Object Case.

User-added image

User-added image


2. Get Records: Add the Get Records from Elements.

User-added image

User-added image 

3. Decision Element : To check if any Group Segments were found for the Case

User-added image

 
Maharajan CMaharajan C
4. Loop Element : To Loop on Group Segments (If they were Found).
User-added image

 5. New Record Collection Variable : To store all Group Segments that is going to updated at end of Loop.

User-added image

6. Assignment Element : To assign field values to Group Segment Status Fieldd to Completed in Loop one by one.

User-added image

7. Assignment Element : To add this Single GS Record in each iteration to new Record Collection Variable created in step 5.

User-added image

8. Update Element : To update the GS Records in the Collection after Loop Finishes

 User-added image
Maharajan CMaharajan C
Final Flow Screen will be:

User-added image


Rajesh one challange is here in Record Trigger Flow we don't have the option to check whether the Case Staus ISCHANGED or Not once the case got closed. We have this feature in Spring 21. 
https://releasenotes.docs.salesforce.com/en-us/spring21/release-notes/rn_forcecom_flow_fbuilder_prior_values_flow.htm
https://www.salesforce.com/form/signup/prerelease-spring21/


Also refer the below blog, Where we have the same scenario but Account and Contacts. I got this blog after i have finished the above flow in my dev org. Since my reply got delayed here.
https://www.accidentalcodersf.com/2020/12/prior-value-in-record-triggered-flow.html

Thanks,
Maharajan.C
This was selected as the best answer