Hi,
I am trying to create an OData query which filters the data based on an Entity Reference in the linked record.
So basically, I want to get all appointments from an Account (I have the Guid for the Account), which are linked through its Contacts.
Not all Contacts are linked with an Account.
My query works well if I dont filter the data. I can see the Appointments which are linked to a Contact and from the Contact I can also see the Account.
If I put the query the same way as I show the Account of the Contact, I get the error message:
<error xmlns="schemas.microsoft.com/.../metadata">
<code>-2147220989</code>
<message xml:lang="en-US">attributeName</message>
</error>
I suspect, that this error occurs, since not all Contacts are linked to an Account and therefore my Filter runs to a NullReferenceException. Could this be the case ?
If yes, how can I say in the filter "LookupField contains data" ?
If yes, how can I say in the filter "LookupField contains data" ?