web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / "Expand Query" for Dyn...
Power Automate
Unanswered

"Expand Query" for Dynamics CRM is not fetching related data

(0) ShareShare
ReportReport
Posted on by 2

Hi,

I'm using Flow for CRUD operation on Dynamics CRM data.

I'm trying to fetch all the related "Appointments" for a given "Contact" from CRM. For this I've already tried "Dynamics 356 - List Records" and "Dynamics 356 - List Records (V2)" actions/activities in the flow with "Expand Query" option (Contact_Appointments). This is a general 1:N relationship in default Dynamics CRM instance. However, the body of the response does not contain any related "Appointment" data. (I do not get any error message, the body only contains the "Contact" entity data). Following is the details of the action.

Dynamics 356 - List Records - ActionDynamics 356 - List Records - Action

It would be really helpful if anyone can guide me how to achieve it.

Categories:
I have the same question (0)
  • v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi DiptimanBadajen,

     

    Please take this documentation about “OData system query options using the OData endpoint” for a reference:
    https://msdn.microsoft.com/en-us/library/gg309461(v=crm.7).aspx#BKMK_expand

     

    From the doc we know that “$expand directs that related records should be retrieved in the record or collection being retrieved.

     

    If you want to retrieve related records, locate the name of the entity relationship that defines this relationship. You may have to view the entity relationship information in the application to correctly identify the relationship or the conceptual schema definition language (CSDL) for the Organization Data Service.

     

    For example, to retrieve opportunity records related to accounts, use the opportunity_customer_accounts entity relationship. The query /AccountSet?$expand=opportunity_customer_accounts returns the opportunity records and the account records.”

     

    Please try to configure the Expand query according to this doc.

     

    Hope this could be a reference for you.

     

    Best regards,
    Mabel Mao

  • Jim Daly Profile Picture
    Microsoft Employee on at

    @v-yamao-msft 
    The link you have provided is not correct.

    This link is for an older OData v2. endpoint in CRM 2015.

    You need to direct people to the current documentation for the Web API, which is located here: 

    https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/webapi/query-data-web-api#apply-system-query-options

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 304

#2
David_MA Profile Picture

David_MA 245 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 243 Most Valuable Professional

Last 30 days Overall leaderboard