Hello Everyone,
I'm currently working on querying the OData v4 /Customer endpoint for Business Central in order to retrieve customers based on a user's search criteria for either name or customer number.
I can successfully make a call to:
https:/api.businesscentral.dynamics.com/v2.0/{_businessCentralOptions.TenantId}/{_businessCentralOptions.Environment}/ODataV4/Company('{_businessCentralOptions.CompanyName}')/Customer
This call retrieves all customers, and I can narrow down the results by adding a filter, for example:
/Customer?$filter=contains(Search_Name,'TESTING')
Search_Name
and No
fields simultaneously, like this:/Customer?$filter=contains(Search_Name,'TESTING') or contains(No,'50000')
This query returns a 501 not implemented error.
In my testing, I found that chaining multiple contains
together works if I'm searching within the same field:
/Customer?$filter=contains(Search_Name,'TESTING1') or contains(Search_Name,'TESTING2')
Search_Name
and No
fields simultaneously? I came across an article suggesting the use of the $search
option, but it seems to be ignored in my case. Any guidance on this matter would be greatly appreciated.Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,228 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156