We want to retrieve a specific record by Id along with all the related elements (eg - Retrieve Account A with all of its related Contacts).
What we already know:
We can retrieve the account record itself along with related records that are linked with lookupfields, like the PrimaryContact
This works, but it returns only one contact, the primary one.
Instead, we need an embedded list of contacts, like
"Contacts“ : [
Given the first URL in the response, we expected that all NavigationProperties would behave the same:
But this collection:
Is not accessible. If we call for :
We get this error in return:
"message": "An error has occurred."
If we use other expand values, we retrieve meaningful errors like „Could not find a property named xy“, but this error is not self explaining. How can we return an object with an embedded list of children? I know that in this example we also could ask for a list of Contacts filtered by their account, but we cannot do that in all scenarios we have in mind.