Loading

Salesforce Platform Flow: Update Child Objects from Parent Record Changes

Publiseringsdato: Apr 2, 2026
Beskrivelse
I need to update all the child records of a specific object automatically when an update happens on the parent record.

For example, if an Opportunity is set to Closed Lost, I want all its Tasks to be set to Completed
Løsning

A Record-Triggered flow on the parent object will be necessary for this, with a simple Update Records element for the child record(s).

The below will explain how to do so from an Opportunity record. When its stage changes to Closed-Lost, all its related Tasks should update to Completed. You can apply the same logic to any parent or child object:


Step 1. Navigate to Setup
 

SetUp.png
 

Step 2. In the Quick Find box, enter and click on Flows
 

Quick Find.PNG


Step 3. Click on the New Flow button and select Record-Triggered Flow and Create
 

Record Trigger Flow.PNG

 

a. Select Opportunity as the object and Trigger the Flow When: should be set to A record is created or updated

Select Object.png

b. In the Set Entry Conditions section, select All Conditions Are Met (AND) for Condition Requirements and enter:
 
  • Field: StageName
  • Operator: Equals
  • Value: Closed Lost
 
Set Entry Conditions.PNG

c.  Make sure you select Only when a record is updated to meet the condition requirements option in the When to Run the Flow for Updated Records section and optimize the flow for Actions and Related Records. Click on Done

When to Run the Flow.PNG
 

Step 4. Add a new element and choose Update Records


a. Give the element a Name (Label). The API Name will auto-populate
 
Update Opportunity Record.PNG

b. In the How to Find Records to Update and Set Their Values section, select Update records related to the opportunity record that triggered the flow

How to Find Records.PNG
 
c. In the Records Related to Opportunity, select $Record>Tasks

Select the record.PNG
 
d. In the Set Filter Conditions section, select All Conditions Are Met (AND) for Condition Requirements to Update Record. Set the following details below:
 
  • Field: Status
  • Operator: Does Not Equal
  • Value: Completed

Set Filter.PNG

e. In the Set Field Values for the Task Records, enter the following and click on Done
 
  • Field: Status
  • Value: Completed

Set Field Values.PNG


Step 5. Click on the Save button and give your Flow a Name

Save.PNG


Step 6. Activate your flow.
 

Activate.PNG


Note: 

Please bear in mind that this will only work for newly created or updated Opportunity records. For existing ones, you'll need to manually update the Task status fields (maybe with the data loader) or create a scheduled flow that would run once on the Opportunity object with the same elements as the record-triggered flow above.

However, if you decide on the scheduled flow option, please remember that the combination of all scheduled flow filters in your organization can’t result in more than a total of 250000 records within 24 hours at the time of writing.

Therefore, if you have too many opportunities to update in one go, consider adding filters to the start element and running scheduled flows over a few days in order to go through all your existing opportunity records.

When an Opportunity closes as Lost, you may want to automatically complete all related Tasks
_____________________________________________________


Written by: Eric Praud | Salesforce MVP

Eric is a Senior Consultant at Epam PolSource and has been working in the Salesforce ecosystem for the past 12 years. He started his Salesforce career as a Salesforce support agent. Like many others, he stumbled across the platform accidentally and hasn’t looked back since. Eric is very active in the Answers community and has been a Salesforce MVP since March 2021.


Submission reflects only the opinion of the user who made available the Submission and not the opinions of Salesforce, regardless of whether the user is affiliated with Salesforce, and may contain of constitute products, services, information, data, content and other materials made available by or on behalf of third parties ("Third Party Materials). Salesforce neither controls nor endorse, nor is Salesforce responsible for, any Third Party Materials, including their accuracy, validity, timeliness, completeness, reliability, integrity, quality legality, usefulness or safety, or any applicable intellectual property rights. Any Submission made available through any message board or forum in response to posted questions, or that otherwise purports to answer any questions, including any questions about Salesforce or Programs, are made available for your general knowledge only and should never relied upon s answer to your specific questions (even if an answer is marked as a "best answer or with any similar qualifications). You should always contact Salesforce support for answers to your specific questions. Salesforce has no control over Submissions, and is not responsible for any use or misuse (including any distribution) by any third party of Submissions.

If you have questions, tap into the wisdom of our entire Trailblazer Community here: https://trailhead.salesforce.com/trailblazer- community/feed

 
Knowledge-artikkelnummer

000394815

 
Laster
Salesforce Help | Article