rec_trackingspec.init(); if rec_trackingspec2.FindLast() then rec_trackingspec."Entry No." := rec_trackingspec2."Entry No." + 1 else rec_trackingspec."Entry No." := 1; rec_trackingspec."Creation Date" := WorkDate(); rec_trackingspec.Positive := true; rec_trackingspec.Validate("Item No.", rec_SalesLine."No."); rec_trackingspec.Validate("Lot No.", rec_itemledgerentry."Lot No."); rec_trackingspec."Location Code" := 'MAIN'; rec_trackingspec.Validate("Quantity (Base)", rec_SalesLine.Quantity); rec_trackingspec.Validate("Bin Code", rec_SalesLine."Bin Code"); rec_trackingspec."Source Ref. No." := rec_SalesLine."Line No."; rec_trackingspec.Insert(true);
Answers
Exampe for Sales Order:
https://forum.mibuso.com/discussion/comment/332040#Comment_332040
For Sales Order use codeunit Sales Line-Reserve (99000834) instead of Purch. Line-Reserve (99000834) (PurchReservEntry)