microsoft / Dynamics-AX-Integration

Dynamics AX Integration samples and demos.
285 stars 356 forks source link

$expand on more than 1 level #109

Open francisharvey opened 3 years ago

francisharvey commented 3 years ago

When will the $expand limitation be removed?

$expand (only first-level expansion is supported) From https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/odata

https://MyServer/data/ProductsV2?$filter=ProductNumber%20eq%20'MyProduct'&$expand=ReleasedProducts($expand=DimensionSet)

An error has occurred. The EDM instance of type '[Microsoft.Dynamics.DataEntities.ReleasedProductV2 Nullable=True]' is missing the property 'DimensionSet'. System.InvalidOperationException

Strange because it exists...

Or Empty Expanded array (on the customer server): { "@odata.context":"https://d365fo-test.sandbox.operations.dynamics.com/data/$metadata#ProductsV2(ProductNumber,ReleasedProducts)","value":[ { "@odata.etag":"W/\"JzEsNTYzNzI3MjA3NjswLDA7MSw1NjM3MjY4MzI2OzAsMDswLDA7MjAwMjkwMTY1MCw1NjM3MjcyMDc2OzAsMDswLDA7MCwwOzAsMDswLDA7MCwwJw==\"","ProductNumber":"200-65-65-65-A","ReleasedProducts":[

  ]
}

] }

The response is complete with releasedproducts if I remove the DimensionSet expand part...

Thanks Francis Harvey