Hi,
I'm having problems updating records using OData web services on Business Central. I've published a couple of pages, 21 and 518, as OData web services. The both return json perfectly, and I can set filters also. However, when updating, I get an HTTP 405 - Method Not Allowed. The the event viewer on the NAV server the following error is logged:
Message (NavODataMethodNotAllowedException): RootException: NavODataMethodNotAllowedException
Entity does not support insert.
The user I use to access the web service is super, so I don't think the issue is related to permissions. Could I be missing some settings in the setup?
BR.
Lars
0
Answers
OData is designed for consuming data, not to handle (edit/delete/isnert) the data.
Have a look at this spec,
https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/odata
You can use SOAP or REST API
https://docs.microsoft.com/en-us/dynamics-nav/api-reference/v1.0/enabling-apis-for-dynamics-nav
I know this a a bit of an old post, but what you state is incorrect.
Business Central supports edit/delete/insert via OData or ODataV4. The URL you state is for Dynamics 365 Finance and Operation (the former Axapta or AX) - NOT for Business Central (the former Navision or NAV).
It is however true that Business Central also supports SOAP.
For Business Central OData support, see https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/webservices/odata-web-services
By the way - if you want to test it yourself, I have a blog post with a powershell doing edit/delete/insert of Customers here: https://scblog.lynge.org/?p=1105 (unfortunately it is in danish, but the powershell is english).
Best Regards,
Gert Lynge
I know this a a bit of an old post, but just to give you an answer.
Page 518 is a read only page (property Editable=No). So that won't work for editing.
In regards to page 21 it should work.
You can try it from powershell as described here https://scblog.lynge.org/?p=1105 (this exact example uses page 21).
Best Regards,
Gert Lynge
Br.
Lars