Setting up Change Log to track Modification of objects

spycraft
Member Posts: 66
Hi..
I'm currently looking into the Change Log functionality to track the insertion, modification and deletion of Navision objects (Table 2000000001).
Although I have defined to track insert, modify and delete for all fields of Table 2000000001, I noticed change log entries are created only for deletion of Navision objects.
Is this how Change Log works or have I missed any other configuration, where Change Log did not log any entry?
Regards,
Spy
I'm currently looking into the Change Log functionality to track the insertion, modification and deletion of Navision objects (Table 2000000001).
Although I have defined to track insert, modify and delete for all fields of Table 2000000001, I noticed change log entries are created only for deletion of Navision objects.
Is this how Change Log works or have I missed any other configuration, where Change Log did not log any entry?
Regards,
Spy
0
Comments
-
Only user changes are logged in Change log. For example if you do MODIFYALL in code on some field, no log is created. Change log have limited functionality. It is only for tracking User changes, not changes from code.
Save of object is in this case made through code, not by user, there may be the problem.0 -
If you are sitting on a SQL database you could write a SQL triggger to catch ALL changes (user or code created)
you could base it on this (a trigger for the objects table)
http://www.mibuso.com/dlinfo.asp?FileID=3510 -
kine wrote:Only user changes are logged in Change log. For example if you do MODIFYALL in code on some field, no log is created. Change log have limited functionality. It is only for tracking User changes, not changes from code.
Save of object is in this case made through code, not by user, there may be the problem.
Hi Kine,
Thanks for your response.
Just a further thought: since saving objects are made through code, how do we explain the logging of deletion of Navision objects?0 -
MrDee wrote:If you are sitting on a SQL database you could write a SQL triggger to catch ALL changes (user or code created)
you could base it on this (a trigger for the objects table)
http://www.mibuso.com/dlinfo.asp?FileID=351
Hi MrDee,
Thanks for your recommendation. It fits exactly my objectives perfectly!0 -
0
-
spycraft wrote:Hi Kine,
Thanks for your response.
Just a further thought: since saving objects are made through code, how do we explain the logging of deletion of Navision objects?
How do you delete objects? You press F4 - it is user delete action.
How do you save or create new objects? By wizard or with some CTRL-S or something which will ask you Do you want to save..... compile.... it is some code which save objects.
This is main difference... ;-)
Yes, SQL trigger is solution...0 -
Hi,
I'm trying to use your script, but in some databases I'm getting the message bellow in NAV.
After I run the script against database and then, try to save, create, delete a object in NAV I get the error and I could not create, delete or modify any ibjecto inside NAV.
Any idea about it?
Thanks,
Nuno
Microsoft Business Solutions-Navision
Aconteceu o seguinte erro no SQL Server em tanto ao acessar à Object tabela:
8152,"22001",[Microsoft][ODBC SQL Server Driver][SQL Server]String or binary
data would be truncated.
3621,"01000",[Microsoft][ODBC SQL Server Driver][SQL Server]The statement
has been terminated.
SQL:
UPDATE "TESTDB"."dbo"."Object" WITH (REPEATABLEREAD) SET "BLOB Reference"=
NULL,"BLOB Size"=4404,"Date"={ts '2008-12-12 00:00:00.000'},"Time"={ts
'1754-01-01 18:43:22.941'} WHERE ("Type"=5 AND "Company Name"='' AND
"ID"=85002) AND ("timestamp"<=0x0000000034E9CBE8)
OK
Cumps,
Mestre0 -
Hi,
I'm trying to use your script, but in some databases I'm getting the message bellow in NAV.
After I run the script against database and then, try to save, create, delete a object in NAV I get the error and I could not create, delete or modify any ibjecto inside NAV.
Any idea about it?
Thanks,
Nuno
Microsoft Business Solutions-Navision
Aconteceu o seguinte erro no SQL Server em tanto ao acessar à Object tabela:
8152,"22001",[Microsoft][ODBC SQL Server Driver][SQL Server]String or binary
data would be truncated.
3621,"01000",[Microsoft][ODBC SQL Server Driver][SQL Server]The statement
has been terminated.
SQL:
UPDATE "TESTDB"."dbo"."Object" WITH (REPEATABLEREAD) SET "BLOB Reference"=
NULL,"BLOB Size"=4404,"Date"={ts '2008-12-12 00:00:00.000'},"Time"={ts
'1754-01-01 18:43:22.941'} WHERE ("Type"=5 AND "Company Name"='' AND
"ID"=85002) AND ("timestamp"<=0x0000000034E9CBE8)
OK
I also faced this issue, and realized that My database name was having length of 23 characters and in NavAudit query it is mentioned just Varchar 10. After increasing database Name field length this issue got resolved. You can check for your fields, if somewhere you can increase length of your string for that query to work.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions