Determining Item Tracking for Sales Invoice 4.0
Bokk
Member Posts: 138
I am moving some customizations for Item Tracking (Serial No.s) in sales reports to 4.0 and the underlying tables have changed. They used to be stored in specific ledger tables (ie. Sales Shipment Item Tracking), but are now in the Item Ledger Entries table. I was able to rework the Shipment, Credit Memo and Order reports by changing the dataitem source and filtering differently. It was pretty straightforward, but the Sales Invoice does not seem to have a direct relationship based on a foreign key. I followed the application from a Posted Sales Invoice -> Line -> Item Tracking Lines and it uses codeunit 6500 to get RowIDs. I tried using this, but am running into an infinite loop.
I am working on the Sales Invoice Rpt 10074. I only added an Integer indented dataitem to the bottom with the code to retrieve the Serial No.s. The report gets the sales details in the 2nd dataitem, Sales Invoice Line and stores them in the global, TempSalesInvoiceLine to be looped through and displayed in the 6th dataitem, SalesInvLine. I used a similiar loop and called codeunit 6500 in the OnAfterGetRecord trigger to try to display the Serial No.s as follows, but am getting an infinite loop.
OnLineNumber := OnLineNumber + 1;
WITH TempSalesInvoiceLine DO BEGIN
IF OnLineNumber = 1 THEN
FIND('-')
ELSE
NEXT;
END;
IF NEXT <> 0 THEN
ItemTrackingMgt.ComposeRowID(DATABASE::"Sales Invoice Line",
0,TempSalesInvoiceLine."Document No.",'',0,TempSalesInvoiceLine."Line No.");
I need to get my report working, but am also curious why the relationship is being established like this. Perhaps I am missing the obvious, but it seems much more complicated.
Thanks!
I am working on the Sales Invoice Rpt 10074. I only added an Integer indented dataitem to the bottom with the code to retrieve the Serial No.s. The report gets the sales details in the 2nd dataitem, Sales Invoice Line and stores them in the global, TempSalesInvoiceLine to be looped through and displayed in the 6th dataitem, SalesInvLine. I used a similiar loop and called codeunit 6500 in the OnAfterGetRecord trigger to try to display the Serial No.s as follows, but am getting an infinite loop.
OnLineNumber := OnLineNumber + 1;
WITH TempSalesInvoiceLine DO BEGIN
IF OnLineNumber = 1 THEN
FIND('-')
ELSE
NEXT;
END;
IF NEXT <> 0 THEN
ItemTrackingMgt.ComposeRowID(DATABASE::"Sales Invoice Line",
0,TempSalesInvoiceLine."Document No.",'',0,TempSalesInvoiceLine."Line No.");
I need to get my report working, but am also curious why the relationship is being established like this. Perhaps I am missing the obvious, but it seems much more complicated.
Thanks!
SGM
0
Comments
-
If you are trying to get the item tracking lines to print for each invoice line on the invoice.. I can help... send me your email address and I will forward you the instructions to do so...0
-
Look at the table "Item Entry Relation" to establish the relationships between "Item Ledger Entry" and posted documents.There are no bugs - only undocumented features.0
-
The "Item Entry Relation" table establishes a relationship between item ledger entries and posted document lines (typically sales shipments and purchase receipts). And the "Value Entry Relation" table establishes a relationship between value entries and posted document lines (typically posted sales and purchase invoices). Since you are starting from the posted sales invoice you will have to use the value entry relation table to find the related value entries and from there find the item ledger entries which will contain the serial numbers.0
Categories
- All Categories
- 75 General
- 75 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions