Importing Starting Inventory from Legacy System
matttrax
Member Posts: 2,309
All inventory is serialized, so Item Tracking Code is SNALL.
Pulling data into an item journal line. Normal stuff like posting date, description, quantity, the usual.
Using the following code to add the reservation entry:
Everything looks ok at this point in table 337 (Reservation Entry) and the item journal lines look great.
Posting Error: You must not specify serial no in item journal line...
If I delete the serial number and try to post I get the error:
"Tracking Specification is Missing"
What am I missing here? Debugger and code coverage were less than helpful.
Pulling data into an item journal line. Normal stuff like posting date, description, quantity, the usual.
Using the following code to add the reservation entry:
CreateReservEntry.SetDates( 0D, 0D); CreateReservEntry.CreateReservEntryFor( DATABASE::"Item Journal Line", 0, ItemJnlLine."Journal Template Name", ItemJnlLine."Journal Batch Name", 0, ItemJnlLine."Line No.", ItemJnlLine."Qty. per Unit of Measure", 1, SerialNo, ''); CreateReservEntry.CreateEntry( ItemJnlLine."Item No.", ItemJnlLine."Variant Code", ItemJnlLine."Location Code", ItemJnlLine.Description, ItemJnlLine."Posting Date", ItemJnlLine."Document Date", 0, 2);
Everything looks ok at this point in table 337 (Reservation Entry) and the item journal lines look great.
Posting Error: You must not specify serial no in item journal line...
If I delete the serial number and try to post I get the error:
"Tracking Specification is Missing"
What am I missing here? Debugger and code coverage were less than helpful.
0
Comments
-
Hi matttrax,
Had this before - you can't put the serial number into the journal line table it need to go onto the reservation table - are you specifing the serial no. on the create entry routine?
What I normally do is to manually enter a line and then look at the system generated entry
Hope this helps0 -
matttrax wrote:All inventory is serialized, so Item Tracking Code is SNALL.
Pulling data into an item journal line. Normal stuff like posting date, description, quantity, the usual.
Using the following code to add the reservation entry:CreateReservEntry.SetDates( 0D, 0D); CreateReservEntry.CreateReservEntryFor( DATABASE::"Item Journal Line", 0, ItemJnlLine."Journal Template Name", ItemJnlLine."Journal Batch Name", 0, ItemJnlLine."Line No.", ItemJnlLine."Qty. per Unit of Measure", 1, SerialNo, ''); CreateReservEntry.CreateEntry( ItemJnlLine."Item No.", ItemJnlLine."Variant Code", ItemJnlLine."Location Code", ItemJnlLine.Description, ItemJnlLine."Posting Date", ItemJnlLine."Document Date", 0, 2);
Everything looks ok at this point in table 337 (Reservation Entry) and the item journal lines look great.
Posting Error: You must not specify serial no in item journal line...
If I delete the serial number and try to post I get the error:
"Tracking Specification is Missing"
What am I missing here? Debugger and code coverage were less than helpful.
Manually insert item tracking in journal line. Then compare reservation entries differences between your automated post and manually inserting.0 -
Hello You are calling the function CreateReservEntryFor with wrong paramaeter
CreateReservEntry.CreateReservEntryFor( DATABASE::"Item Journal Line", ItemJnlLine."Entry Type", ItemJnlLine."Journal Template Name", ItemJnlLine."Journal Batch Name", 0, ItemJnlLine."Line No.", ItemJnlLine."Qty. per Unit of Measure", 1, 'tada', '');
notice the red.
CreateReservEntry.CreateReservEntryFor(
DATABASE::"Item Journal Line",
ItemJnlLine."Entry Type",
ItemJnlLine."Journal Template Name",
ItemJnlLine."Journal Batch Name",
0,
ItemJnlLine."Line No.",
ItemJnlLine."Qty. per Unit of Measure",
1,
'tada',
'');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
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 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
