[Event Request] codeunit 90 "Purch.-Post" - OnPostPurchLineOnAfterInsertReceiptLine #27930
Description
Describe the request
We like to request the following change: add IntegrationEvent
Object: Codeunit::"Purch.-Post"
Procedure: PostPurchLine
Reason: get data after insert record
Additional context
Code to change:
...
IsHandled := false;
OnPostPurchLineOnBeforeInsertReceiptLine(
PurchHeader, PurchLine, IsHandled, PurchRcptHeader, RoundingLineInserted, CostBaseAmount, xPurchLine, ReturnShptHeader, TempTrackingSpecification, ItemLedgShptEntryNo, SrcCode, PreviewMode);
if not IsHandled then
if (PurchRcptHeader."No." <> '') and (PurchLine."Receipt No." = '') and
not RoundingLineInserted and not PurchLine."Prepayment Line"
then
InsertReceiptLine(PurchRcptHeader, PurchLine, CostBaseAmount);
++ OnPostPurchLineOnAfterInsertReceiptLine(PurchHeader, PurchLine, PurchRcptHeader);
IsHandled := false;
OnPostPurchLineOnBeforeInsertReturnShipmentLine(PurchHeader, PurchLine, IsHandled, ReturnShptHeader, TempPurchLineGlobal, RoundingLineInserted, xPurchLine);
if not IsHandled then
if (ReturnShptHeader."No." <> '') and (PurchLine."Return Shipment No." = '') and
not RoundingLineInserted
then
InsertReturnShipmentLine(ReturnShptHeader, PurchLine, CostBaseAmount);
OnPostPurchLineOnAfterInsertReturnShipmentLine(PurchHeader, PurchLine, ReturnShptHeader, TempPurchLineGlobal, RoundingLineInserted, xPurchLine, PurchCrMemoHeader);
...
[IntegrationEvent(true, false)]
local procedure OnPostPurchLineOnAfterInsertReceiptLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header");
begin
end;
Internal work item: AB#562612