Search code examples
odataaxaptadynamics-ax7

String filtering with Ax7 oData gives error


I am trying to use the Ax7 oData endpoints to search for sales quotations by Name. Using equality works just fine, but the more advanced filter functions gives me errors.

This simple EQ query works OK: https://myAx7Server/data/SalesQuotationHeaders?$filter=SalesQuotationName eq 'Sparrow Retail'

But this query gives me the error "The type 'System.String' for the query operator is not Queryable!"

https://myAx7Server/data/SalesQuotationHeaders?$filter=startswith(SalesQuotationName,'S')

Am I doing something wrong, or is it just that these oData endpoints do not support searching by string?


Solution

  • Found the answer here: https://ax.help.dynamics.com/en/wiki/dynamics-ax-7-services-technical-concepts-guide/#odata-services

    This is implemented as a wildcard character Example: http://host/service/EntitySet?$filter=StringField eq '*retail*'