Hi sir
Thank you for your Response
I have modified code as follow but How it will update Purch Recpt line as no Record variable taken as purch. Recpt line
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Whse.-Post Receipt", 'OnAfterPostedWhseRcptLineInsert', '', true, true)]
local procedure OnAfterPostedWhseRcptLineInsert(var PostedWhseReceiptLine: Record "Posted Whse. Receipt Line"; WarehouseReceiptLine: Record "Warehouse Receipt Line")
var
PurchaseRecptHeader: Record "Purch. Rcpt. Header";
begin
if PostedWhseReceiptLine."Posted Source Document" = PostedWhseReceiptLine."Posted Source Document"::"Posted Receipt" then begin
PurchaseRecptHeader.Get(PostedWhseReceiptLine."Posted Source No.");
PostedWhseReceiptLine."Supplier Lot No." := WarehouseReceiptLine."Supplier Lot No.";
PostedWhseReceiptLine.Remarks := WarehouseReceiptLine.Remarks;
PostedWhseReceiptLine."Supplier Date" := WarehouseReceiptLine."Supplier Date";
PostedWhseReceiptLine."QC Inspector" := WarehouseReceiptLine."QC Inspector";
PostedWhseReceiptLine."Sample Qty" := WarehouseReceiptLine."Sample Qty";
end;
end;