we have a WPF application which communicates with NAV 2009 R2 via web service. Meaning we display data from NAV in our WPF app and also insert/modify them from the app.
One of our customers uses Change Log functionality in NAV but when records are inserted/modified from our app then no record in Change Log Entry table is created.
Found following link: http://msdn.microsoft.com/en-us/library/hh167300(v=nav.70).aspx
We tried to do a modification to make it working similar way as in NAV 2013 but did not help. Any other hint, experience??
do you call insert(true) in c/al code?
we use XML ports to insert data in NAV thus insert(true) is not possible to use
you seem to use xmlport parameters to get classes in .net code. that fine.
do following: encapsulate the code in the oninsert trigger to a function “CallOnInsert”.
within the webservice method “insert” in your c/al code call that function “CallOnInsert”. so this insert also runs through the whole code needed to create the additional objects.
I think your suggestion can work but since we use quite a lot of xml ports we were thinking if there is some solution which could work more generally.
Anyway thanks for your help!!
If not changed in recent times (cumulative updates), the change-log does only work when data is entered in forms and pages.
It does not work when data is handled in reports, XML-ports or whatever. Tos use VALIDATE and INSERT(TRUE) don’t do it.
You have to handle it yourself via codeunit 1, functions OnGlobalInsert, -Modify,… (before NAV 2013) or functions OnDatabaseInsert, - Modify, … in NAV 2013+.
Not sure if completely understand what you mean.
What we tried to do even in the very begining was to move calling of Change Log functionality in CU1 from OnGlobalInsert to OnDatabaseInsert in 2009 but did not help.