How to create Item Tracking line for Sales Order and Transfer order through CAL Code???
kovaidon
Member Posts: 55
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
item tracking lines.PNG
9.7K
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
item tracking lines.PNG
9.7K
0
Best Answer
-
Dear kovaidon,
Edit: by the way, you got your answer already here: http://forum.mibuso.com/discussion/66835/how-to-create-item-tracking-line-for-sales-order-and-transfer-order-through-cal-code#latest
If you want to insert the reservation entries automatically for the user, you have to know where to get the data from and how to handle each scenario. The below example is a simple reception of quantity X on a previously created Lot No.
Also, pay attention to updates in case the user changes the order before posting.
To avoid issues, you might create the tracking lines just before the posting action.
I also recommend checking the purchase or sales order for missing or incoherent data before creating reservation lines based on it. It might also be helpful to delete previous reservation attempts
Best regards,
SebastienIF ReservationEntry.FINDLAST THEN n_reservationentry := ReservationEntry."Entry No." + 1 ELSE n_reservationentry := 1; ReservationEntry.RESET; ReservationEntry."Entry No." := n_reservationentry; ReservationEntry.Positive := TRUE; ReservationEntry."Item No." := EndPurchaseLine."No."; ReservationEntry."Location Code" := EndPurchaseLine."Location Code"; ReservationEntry."Quantity (Base)" := EndPurchaseLine."Qty. to Receive (Base)"; ReservationEntry."Reservation Status" := 2; ReservationEntry.Description := EndPurchaseLine.Description; ReservationEntry."Creation Date" := WORKDATE; ReservationEntry."Source Type" := 39; ReservationEntry."Source Subtype" := 1; ReservationEntry."Source ID" := EndPurchaseLine."Document No."; ReservationEntry."Source Ref. No." := EndPurchaseLine."Line No."; ReservationEntry."Created By" := USERID; ReservationEntry."Qty. per Unit of Measure" := EndPurchaseLine."Qty. per Unit of Measure"; ReservationEntry.Quantity := EndPurchaseLine."Qty. to Receive"; ReservationEntry."Qty. to Handle (Base)" := EndPurchaseLine."Qty. to Receive (Base)"; ReservationEntry."Qty. to Invoice (Base)" := EndPurchaseLine."Qty. to Receive (Base)"; ReservationEntry."Lot No." := EndPurchaseLine."Variant Code"; ReservationEntry."Variant Code" := EndPurchaseLine."Variant Code"; ReservationEntry."Item Tracking" := ReservationEntry."Item Tracking" :: "Lot No."; ReservationEntry.INSERT;5
Answers
-
Dear kovaidon,
Edit: by the way, you got your answer already here: http://forum.mibuso.com/discussion/66835/how-to-create-item-tracking-line-for-sales-order-and-transfer-order-through-cal-code#latest
If you want to insert the reservation entries automatically for the user, you have to know where to get the data from and how to handle each scenario. The below example is a simple reception of quantity X on a previously created Lot No.
Also, pay attention to updates in case the user changes the order before posting.
To avoid issues, you might create the tracking lines just before the posting action.
I also recommend checking the purchase or sales order for missing or incoherent data before creating reservation lines based on it. It might also be helpful to delete previous reservation attempts
Best regards,
SebastienIF ReservationEntry.FINDLAST THEN n_reservationentry := ReservationEntry."Entry No." + 1 ELSE n_reservationentry := 1; ReservationEntry.RESET; ReservationEntry."Entry No." := n_reservationentry; ReservationEntry.Positive := TRUE; ReservationEntry."Item No." := EndPurchaseLine."No."; ReservationEntry."Location Code" := EndPurchaseLine."Location Code"; ReservationEntry."Quantity (Base)" := EndPurchaseLine."Qty. to Receive (Base)"; ReservationEntry."Reservation Status" := 2; ReservationEntry.Description := EndPurchaseLine.Description; ReservationEntry."Creation Date" := WORKDATE; ReservationEntry."Source Type" := 39; ReservationEntry."Source Subtype" := 1; ReservationEntry."Source ID" := EndPurchaseLine."Document No."; ReservationEntry."Source Ref. No." := EndPurchaseLine."Line No."; ReservationEntry."Created By" := USERID; ReservationEntry."Qty. per Unit of Measure" := EndPurchaseLine."Qty. per Unit of Measure"; ReservationEntry.Quantity := EndPurchaseLine."Qty. to Receive"; ReservationEntry."Qty. to Handle (Base)" := EndPurchaseLine."Qty. to Receive (Base)"; ReservationEntry."Qty. to Invoice (Base)" := EndPurchaseLine."Qty. to Receive (Base)"; ReservationEntry."Lot No." := EndPurchaseLine."Variant Code"; ReservationEntry."Variant Code" := EndPurchaseLine."Variant Code"; ReservationEntry."Item Tracking" := ReservationEntry."Item Tracking" :: "Lot No."; ReservationEntry.INSERT;5
Categories
- All Categories
- 73 General
- 73 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
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 328 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
