#SalesforceWinter26 [Tip 18] - Get Related Records Across All Levels with Nested Loops (Beta)
Use nested loops to access all levels of related records in complex data relationships. Previously, you accessed only one level of related records.
Nested loops help you build a more comprehensive automation. For example, an account has several related team members. Each team member has related cases. With nested loops, you can iterate through each team member, and then for each team member, iterate through all their related cases. Update each case status for every team member related to the account.
Product Area: Flow
1. In the ‘Get Records’ element, click ‘Also get related records’ and click ‘Select Related Records’.
2. Select child objects like ‘Contacts’ related to Account in the Related Records configuration screen.
3. Select the object and the fields that you want to retrieve.
4a. Add ‘Cases’ under Contacts.
4b. Select each of the related object and click on Filter, Sort, Store tab to specify the filter condition and the sort option for the selected object.
5. Navigate to ‘Preview’ tab to preview your selections before saving configuration. Click ‘Save’.
6. Add a loop element. To select the related records collection, select the element ‘Get Account & Its Child Records’ -> ‘Contacts’.
7. Add a nested loop element for more than one level of related records and select the ‘Cases’ collection under Contacts.
References & Useful URLs
For Related Winter ’26 Release Note Article – Click Here