Steps to reproduce
Using a raw hash (not URL-encoded), results in an error: BadRequest_NotFound "Bad Request - Error in query syntax."
The response is the same for both custom APIs and the v2.0 API.
Why do I need a hash in the url?
We are trying to update the 'Manufacturer Code' field of an item. That field is not in the v2.0 Microsoft API, so we use a custom API, where an item is identified by the 'No' field. To update the manufacturer code of an item, I use OData and call:
PATCH api.businesscentral.dynamics.com/.../Items(No='...')
Many of our items contain # in their item number (No).
Any help or alternative solution is welcome.
Thank you for your suggestion Hasnain Ali.
Unfortunately I get the Authentication_InvalidCredentials error after URL-encoding the hash with %23
Hi,
Have you tried Encoding your URL?
You can use this if it helps:
var
TypeHelper: Codeunit "Type Helper";
begin
URLpath := TypeHelper.UrlEncode(URLpath);
end;
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,219 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156