I was developed a php application that connects to Microsoft Dynamics NAV 2017 OData Web Services, I can read (GET), and create (POST) with no problems,but for delete I receive the error 405, Microsoft say that it is possible to delete :
https://msdn.microsoft.com/es-es/library/dd355398(v=nav.90).aspx
https://msdn.microsoft.com/en-us/library/dn182582(v=nav.90).aspx
I check the page in Dynamics NAV that have a correct property InsertAllowed, ModifyAllowed, or DeleteAllowed, is set to Yes, and I have permissions to delete
After try with postman recevie the same error:
Can someone help me? Thanks
Finally I found the solution!! , I write myself to help another who is with the same problem:
You only have to add the identifier on the request url, in my case the identifier of the customer table ('/Customer(No='.$identifier.')')
This is a sample code in PHP with guzzle and table customer of Dynamics NAV:
for updates (PATCH) I have to first read the etag of the reccord (@odata.etag), and add on the headers (If-Match value) for update: