Is there any way to track what a user does in Navision or to log all the activity of a user for a specified time period? I know about the change log but I don't think I could acheive what I am looking for with the change log functionality or could I?
Any help would be appreciated. Thanks.
0
Comments
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
You got:
- Client Monitor (In NAV)
- SQL Profiler (SQL Server)
- Windows Performance Monitor (on local client)
- Session Monitor (In NAV)
- Change Log (That you mentioned)
- User Time Registers (in NAV: Administration / IT Administration / Users / Time Registers)
And I'm sure I'm forgetting some... .
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
What specifically do they want to monitor?
I think if there were tools that fit your needs already built into Nav you would have found themby now :-k
http://www.BiloBeauty.com
http://www.autismspeaks.org
I know that ToIncrease has rewritten the Change Log for their Connectivity Studio. But I think this won't be something you need. They store a "previous version of the record" in a table. Is much overhead and you don't have the user that changed the record ... .
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
For logging what data has been changed, you should do it inside NAV, because you need the OnModify, ... triggers. Also, it's necessary that it's logged inside the client where the user is working on.
And that's exactly what the Change Log does.
Now, if you don't want it to activate for all users, you could build a hack into the change log functionality. I was thinking of something like:
1) eliminate the change log setup
2) in the table "User Setup", add a field "Change Log Activated"
3) change the Change Log code in codeunit 1 and codeunit 423 to make use of this field (only log if that user is the current user).
Another possibility is not to hack the default Change Log, but do your own thing with the triggers in codeunit 1 (OnGlobalInsert, OnGlobalModify, ... ).
Keep in mind (and that also counts for the Change Log functionality) that the global triggers won't be triggered when tables are changed through code. Only when a users is working straight into a table and changing data (e.g. in an item card).
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
Good explanation Waldo except that you still can trace all logs also via code and all what you need to do is using the i.e INSERT(TRUE), MODIFY(TRUE), DELETE(TRUE) which means that it will insert a record in a change log because the process that inserts records into change log is under the INSERT, MODIFY and DELETE triggers and it may be also under certain field validation.
I advice you to use Change log functionalities which I find better than the SQL profiler.
You don't need to use change log for all tables but you can be more specific for the main table that you need to trace their changes.
Change log is a nice thing to use.
Cheers,
Dries.
this is what I double checked this morning:
- activated the Change Log.
- wrote a codeunit with this code:
Changing data on the item card, it logged like expected. Using the codeunit, it changed the description, but it didn't log in the Change Log, like I expected.
Yes, it's possible to manually add the code to the triggers to log into the ChangeLog, but depending on the amount of tables you want to log, it can become quite a big job... (and performance overhead!).
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
Try this out:
Declare these variables:
Name DataType Subtype Length
OldRrf RecordRef
NewRrf RecordRef
ChangeLogMgt Codeunit Change Log Management
Put this on the OnModify trigger of your table.
OldRrf.GETTABLE(xRec);
NwRrf.GETTABLE(Rec);
MODIFY;
ChangeLogMgt.LogModification(NwRrf, OldRrf);
Run again your code.
Success,
Dries.
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog