I am receiving an error saying that advanced filtering is not available. Im assuming this is because it is parsing the apostrophe in domino’s and treating it as a filter parameter.
has anyone else come accross this an is there a way that you can escape the apostrophe so it is parsed as par of the string and not the filter.
If I right click on the URL, is passes everything up to the equals sign to the browser - and the way Business central works is that the very first customer in the system is displayed.
If however I copy the entire URL from the note and paste it into my browser, the actual customer I am interested in is displayed.
Looking at the actual note it appears that the URL is finished once it hits the first ‘ (single quote)
Epiphany time - I just constructed the filter with %27 replacing single quotes and the complete URL is there - and the link works.
Good pickup. In the ServiceM8 REST API, string values in a $filter expression are wrapped in single quotes, and when the request is URL-encoded those quotes appear as %27. The /company.json endpoint supports this kind of result filtering.
If an exact name eq '...' filter gets messy with characters like apostrophes, an alternative is to use /search.json?q=... to find the matching company, then use the returned UUID in later requests (filtering on fields like uuid is recommended for best performance).
If you’re still seeing “advanced filtering is not available” after URL-encoding the full filter expression, email support@servicem8.com with the exact request URL and response body.
We’ve shipped a fix for REST API $filter values containing apostrophes inside quoted strings. Filters such as name eq 'Domino's - Joondalup' now parse correctly, and the OData escaped form using doubled apostrophes, such as name eq 'Domino''s - Joondalup', is also supported.
If you still see the old “advanced filtering” error for an apostrophe-containing string filter, please contact support with the exact request URL and response body so we can check the account and request details.