I was able to find the how to create Item Tracking lines in Sales Order automatically
I have checked CDU 99000830 and found two Function.
CreateReserveentryfor.
CreateReserveentry.
Here is the code that i have added and reservation entry is getting created for the same.
CreateReservEntry.CreateReservEntryFor(DATABASE::"Sales Line",
LT37."Document Type",
LT37."Document No.",
'',
0,
LT37."Line No.",
LT37."Qty. per Unit of Measure",
ABS(LT37.Quantity),
ABS(LT37."Quantity (Base)"),
InventorybyLocAndSerial."Serial No." ,
InventorybyLocAndSerial."Lot No.");
CreateReservEntry.CreateEntry(
LT37."No.",
'',
LT37."Location Code",
LT37.Description,
0D,
LT37."Shipment Date",
0,
3);
But Am not able to find any line in Item Tracking lines when i check IN Sales Line --->Line--->Item Tracking lines. it is seems to be empty. Please refer the attachment Picture(Item Tracking Line).
But when i check Reservation entry Table(337). I found a record has been created for that particular line with Source ID = Sales order no.
I dint understand why it is not coming in item Tracking line.
Could any one help me , where the actual mistake , i have done.
Looking for your valuable advice
0
Answers
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
Create a codeunit variable to Create Reserv. Entry
CreateReservEntry.SetDates(0D, 0D);
CreateReservEntry.CreateReservEntryFor(
DATABASE::"Sales Line", SalesLine."Document Type",
SalesLine."Document No.", '', 0, SalesLine."Line No.", SalesLine."Qty. per Unit of Measure",
ResvQty, ResvQty, SerialNo, LotNo);
CreateReservEntry.CreateEntry(Item."No.", SalesLine."Variant Code", SalesLine."Location Code",
Item.Description, ResvDate, ResvDate, 0, 2); // surplus