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.
0
Comments
Andwian
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.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
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.
RIS Plus, LLC