2
votes

I'm using the built in Web Service API in Sitefinity 10. I tried to filter all news items by their related data item/items with Odata, but it seems that it could not be done.

~/api/default/newsitems?$expand={related-data-field}&$filter={related-data-field}/any(c: c/Id eq 888ac18a-85c0-4259-9a3c-05f25e53b23e)

With such a query I get an error with "Value cannot be null.\r\nParameter name: type" message.

Is it even possible to filter by related data item with Odata in Sitefinity? Thanks.

1
Not sure about it's possibility but i know if you are using related items you have to check that type too when setting up the web service. Did you do that?Jon R.

1 Answers

2
votes

A colleague of mine pointed out that Navigational properties of related types are not supported yet for filtering.

https://docs.sitefinity.com/manage-the-properties-of-a-type