HTTP/1.1 500 Internal Server Error Content-Length: 440 Content-Type: application/xml;charset=utf-8 Server: Microsoft-HTTPAPI/2.0 X-Content-Type-Options: nosniff DataServiceVersion: 1.0; Date: Wed, 10 May 2017 21:13:57 GMT <?xml version="1.0" encoding="utf-8"?> <m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"> <m:code /> <m:message xml:lang="en-US">An error occurred while processing this request.</m:message> <m:innererror> <m:message>[b]The underlying application page is not editable.[/b]</m:message> <m:type>Microsoft.Dynamics.Nav.Service.ODataServiceProvider.ODataException</m:type> <m:stacktrace></m:stacktrace> </m:innererror> </m:error>"
Answers
595 is read only!
Thanks for the answer, but I don't think I can create a new page without a developer licence, can I?
The closest I can come to programmatically delete Change Log Entries, would be to write external code that would simulate a user doing it in either NAV Windows Client or NAV web client. I also don't have direct access to the MS SQL NAV DB.
Have you tried?
Else contact your partner.
It takes 14 HTTP requests to sign in and all the way to opening the "Delete Change Log Entries..." dialog, setting a filter, and invoking a click.
Luckily I've done a lot of crazy things like this in the past
Because of the size of some tables (and because it's the right thing to do) I want to do incremental updates and avoid fetching entire tables from NAV. To fetch our Items table and Customer tables via a web service takes few hours.
So I need to detect all CRUD ops done to records in NAV and sync our external DB as fast as possible. In effect It's almost like implementing CRUD ops event handlers externally
For some large tables, I'm using the Last_Date_Time_Modified field exposed via OData/SOAP (I chose OData after some tests as I found it faster) to sync newly CREATEd and UPDATEd records. I can poll for these changes frequently.
This leaves the question how to detect DELETE ops...
So I'm using the Change Log Page web service and setup to log DELETE ops. And poll the Change Log Page web service frequently as well.
It works fine, not real time but very close.
I could poll every 15 seconds if I wanted to, but for our use case, even 5 minutes is acceptable.
For a completely automated solution, I also wanted to programmatically delete the change log entries themselves - I could set a scheduled task in NAv to do it at fixed interval, but still wanted to be able to trim it based on it's size
Create your own deletion log table and use that with sql timestamps as well.
This can be filled from an Event Subscriber codeunit.
Cleanup deletion table from a function created for that. Call that function from WS.
Easy peasy