Sales Booking History and OnInsert,OnModify, OnDelete

fjgillie
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!!
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!!
0
Comments
-
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
Albert0 -
Albert, thank a million! It works well!0
-
Glad to have helped.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