Sales Booking History and OnInsert,OnModify, OnDelete

fjgilliefjgillie Member Posts: 17
Now I want to log sales order insert/update/deletion log into a customized table named Sales Booking Table. My NAV version is NAV 4.0 SP1.

For example,
May 1
Action: Create SO-001, Item A, Qty=10, Price=100
Expection: Booking Entry 1 to record the booking of Item A, Qty=10, Price=100

May 2
Action: Qty is changed from 10 to 20
Expection: Booking Entry 2 to record the debooking of Item A, Qty=-10, Price=100
Booking Entry 3 to record the booking of Item A, Qty=20, Price=100

May 3
Action: Price is changed from 100 to 200
Expection: Booking Entry 4 to record the debooking of Item A, Qty=-20, Price=100
Booking Entry 5 to record the booking of Item A, Qty=20, Price=200

Actually what we need is the sales order booking change log.

In the case, as you know, in sales header the order date is never changed. Originally I think of table 405 change log entry, but the table structure is too complex to output the record format what I need. So I give up the idea to get the information from table 405 to output SO booking report.

Now I create a customized table named SO booking table to record the history. I add new record trigger for my customized table in OnInsert(), OnModify(), OnDelete() of table 37 sales line.
My test result is ok with manually create/update/delete SO. But the trigger to insert customized table record don't work if I convert sales quotation into sales order, or I use DataPort to import sales lines in Sales Order.

So my questions is why OnInsert(), OnModify(), OnDelete() of table 37 sales line is not triggered on the system event occurrence to insert booking entry, i.e. DataPort import or Make Order in Sales Quotation. Could you please have a look at my issue.

Or do you guys has some better solution to help me to output a report of sales order booking?

Thanks in advance!!

Comments

  • AlbertvhAlbertvh Member Posts: 516
    Hi,

    You are not getting the entries in your change because the Dataport and Make Order do not specify

    INSERT/MODIFY/DELETE(TRUE) to fire the trigger


    Hope this helps

    Albert
  • fjgilliefjgillie Member Posts: 17
    Albert, thank a million! It works well!
  • AlbertvhAlbertvh Member Posts: 516
    Glad to have helped.
Sign In or Register to comment.