Please wait, loading...

 

Expend Query in Power Automate flow – List Records using OData filter query Orderby Expend Query Part 2

June 14, 2020

Click HereFilter Query, Expand Query in Power Automate flow – Get Collection of record from CDS Microsoft dynamics 365 – List Records using filter query Orderby Expand Query

Filter ($filter)
Order By ($orderby)
Top ($top)
Expand ($Expand)

Three: Expend ($Expand) in list records action to pull Related Entity and apply $select to specify Attribute of the related entity i.e

https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/06/img_5ee5dbd944f08.png?fit=1475%2C415

The $expand system query option specifies the related resources to be included in line with retrieved resources.

Some examples are :
$expand=primarycontactid($select=fullname)
$expand=primarycontactid$filter=emailaddress1 eq null)
$expand=customerid_account($select=name,address1_city)
$expand=customerid_contact($select=fullname,address1_city)

Example : Expand Contact entity, simple primary contact lookup i.e $expand=primarycontactid

https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/06/img_5ee5ebe409d7e.png?fit=1921%2C347

Example: Expand Contact entity, simple primary contact lookup with filtering $expand=primarycontactid($filter=emailaddress1 eq null)

https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/06/img_5ee5dbd944f08.png?fit=1475%2C415

Some Other Examples

Example: expand a navigation property of an entity type

$expand=Category

Example: expand a navigation property of a Customer type

$expand=customerid_account($select=name,address1_city)
$expand=customerid_contact($select=fullname,address1_city)

Example: Expend related Entity with a  date equal to null

$expand=Primarycontactid($filter=SomeDate eq null)
https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/04/Microsoftdynamics365.png?fit=640%2C651
Microsoft Dynamics Community Profile

Learn more