Hi nav community!
I need to track all changes within Nav objects. So I activated change log via Change Log Setup form for Object table and set Log Insertion, Log Modification and Log Deletion to All Fields. Then changed CU 1 adding MESSAGE in all OnGlobalXxx methods to test what will happen. Next I tried to test it. I created a new table, I expected message "Insert" b/c trigger OnGlobalInsert had to be caused. But nothing happend. After I tested all other actions (like renaming or deletion this table) and they work!
So my question is: why OnGlobalInsert trigger is not caused in the case of Object table, while it's working fine for all others tables provided that the change log is activated for these tables? And how to make to work it?
Thanks in advance! Will wait for your help.
0
Comments
Have you tried the rename/modify from within the designer itself or just by changing the field values in the object list?
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
No no, I don't use any wizards. To test functionality I''m just trying to create any object, let's say Table, in the object designer by clicking on New button. After structure definition is done and object is saved, OnGlobalInsert have to be triggered (because a new record was inserted into Object table), but actually it has not.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
If you are on sql 2008, you can use sql tools to track changes on object table.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Now I have another complex question: how to catch import of objects (File > Import...) in Navision. There is no correspond method to track import in CU 1. In other words I need certain track that import is done.
You could create a dummy object (for example codeunit 90001) which you include with the other objects in the fob-file. Then you can check if this dummy object exists in the database, to know if the fob has been imported.
The 2nd fob will have codeunit 90002 as dummy object, which you can check to know if fob 2 has been imported. Etc.
I know this is not foolproof however.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
If you're tracking from an SQL insert trigger all the objects in the import will be put into the database in the same transaction. If there's only one object you're kinda stuck, though you can catch some of them because the BLOB will be updated and the modified flag will be false. Maybe the modified time?
Just to be certain, there is NO way to make sure you can log everything from C/SIDE because changes to the object table can be made when you're not in a company and nothing will be called.
You can track every change from SQL but it's not always easy to interpret what triggered the change.
viewtopic.php?f=23&t=33344#p162604
TVision Technology Ltd
What was the work around?
Well, actually it is even not workarond but the solution with help another programming language, namely C#. Since it will be a tool with source control functionality, we use "bridge" written on C#, so that I used more wide possibilities of .net to solve this problem
About import, yes I agree that the only one possibility to track it is create trigger for Object table.
Thanks all again!