Change Log Entry for table 336
sneha
Member Posts: 191
Since change log doesn’t monitor the changes by C/AL code, I wanted to achieve it through by adding additional code.
Basically, I want to record all the user changes occurred on item tracking lines form. I tried to add the below lines of code to OnInsert,OnModify trigger on the form 6510 (Item Tracking Lines), but no result in change log entry.
// >>
RecRef.GETTABLE(Rec);
xRecRef.OPEN(RecRef.NUMBER);
xRecRef.GET(RecRef.RECORDID);
ChangeLogManagement.LogModification(RecRef,xRecRef);
// <<
What I am missing.
Basically, I want to record all the user changes occurred on item tracking lines form. I tried to add the below lines of code to OnInsert,OnModify trigger on the form 6510 (Item Tracking Lines), but no result in change log entry.
// >>
RecRef.GETTABLE(Rec);
xRecRef.OPEN(RecRef.NUMBER);
xRecRef.GET(RecRef.RECORDID);
ChangeLogManagement.LogModification(RecRef,xRecRef);
// <<
What I am missing.
0
Comments
-
oninsert and onmodify triggers only get triggered if the CAL code calls them
So if CAL code is
Reservationentry.insert;
it will not trigger the oninsert.
if the code is
Reservationentry.insert(true);
Then it will trigger oninsert
As above post mentioned that in NAV 2009 R2 NAV has added a new trigger in CU that gets triggered no matter if your code is set to insert or insert(true);
This trigger is called for every table. So you have to structure your code.
Now having said all this, logging reservation entry is a horrible idea. If you are using lot tracking/serial no.
Any inventory transaction will have many transaction hitting this table multiple times. This is one of the busiest table for lot/SN tracked item, or if you are using reservation or item tracking or running MRP/MPS.
So tell the customer that the info they will receive from this log table will be useless and have horrible performances.0 -
Thank you all for your help.
We are on Nav 5.0 SP1. Yes, we are using lot and serial tracking. Basically, WH supervisor would like to track who has assigned the serial no,bin no,etc.. and who changed it later on the sales order. We have 10 WH workers, all of them having the similar roles and permissions.0 -
I just want to point this out again. The Reservation Entry table is already a pain in the butt for performance. Adding change logging to it will only make it worse.ara3n wrote:logging reservation entry is a horrible idea0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 333 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


