---
schema_version: "1"
id: 74707ca138cc42ba011fd92d04562149d9f305648c8dd78e3c2da6f445947231
title: Get Related Salesforce Records from a Flow (Beta)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/flow_build_data_get.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.flow_build_data_get.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 05c95e7c755f0e9ce88d3383af114f895a03f00bb294c9bf6e47a112b65576b7
description: Access related records in complex data relationships.. Related records in the Get Records element are available in autolaunched flows.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Get Related Salesforce Records from a Flow (Beta)

Access related records in complex data relationships.. Related records in the Get Records element are available in autolaunched flows.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=platform.flow_ref_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Learn about the editions and user interfaces that support Flow Builder. Some Flow Builder features integrate with other Salesforce products that require additional licenses.">View supported editions.</a></td></tr></tbody></table>

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_note.png)

Note This feature is a pilot or beta service that is subject to the Beta Services Terms at [Agreements - Salesforce.com](https://www.salesforce.com/company/legal/agreements/) or a written Unified Pilot Agreement if executed by Customer, and applicable terms in the [Product Terms Directory](https://ptd.salesforce.com/). Use of this pilot or beta service is at the Customer's sole discretion.

For example, you use a single Get Records element to retrieve an account and all of its account team members. Then, use the Loop element to send each team member a message.

1. Add the Get Records element to your flow.
2. Edit the generated label and description if needed. Flow Builder generates them based on the element's configuration, and the API name populates based on the label.
3. For Object, select an object.
4. Select **Also add related records (beta)**.
5. Click **Select Related Records**.
6. Configure the records to get.
    1. Select fields on the object or collection to include.
    2. Click **Filter, Sort, Store**, and set filter conditions.
        
        You can also set sort order and how many records to store. Your selections persist throughout the Get Records element.
        
        ![The Select Related Objects and Fields window that shows the Account object in the Object column and the Fields tab are selected.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/flow/automate_flow_select_related_records.png)
7. Configure the related records to get.
    1. Click ![Add related object](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/flow/flow_add_related_record.png) then search for a related object.
    2. Click **Select Object**.
        
        For example, add child objects like contacts, linking them to the Account object.
        
        ![The Objects Related to Account field, where Contacts is selected.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/flow/automate_flow_select_related_object.png)
    3. Select fields on the collection to include.
    4. Click **Filter, Sort, Store**, and set filter conditions.
        
        Even if no filters are configured, the Get Records element retrieves records that are related to the object. For example, if no filters are configured, the Get Records element retrieves the contacts that are related to the account. You can also set sort order and how many records to store.
        
        ![The Select Related Objects and Fields window that shows the Contacts collection in the Object column and the Fields tab are selected.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/flow/automate_flow_select_related_child_records.png)
    5. To see the selected objects and fields, click **Preview**.
        
        When the flow runs, it gets the matching records.
        
        ![The Preview tab that shows the data structures of the Account object and Contacts collection.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/flow/automate_flow_related_records_preview.png)
    6. Save your changes then save the flow.

You can view, edit, or delete the objects and fields that you configured. If you delete the related records, the Get Records element keeps the object that you selected. For example, it keeps the Account object selected but removes all its related records.

![The Get Related Records section that shows collapsed sections of Selected Objects and Filter, Sort, and Store Records.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/flow/automate_flow_get_related_records.png)