Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Event Request] codeunit 90 "Purch.-Post" - OnPostPurchLineOnAfterInsertReceiptLine #27930

Open
Athon-dev opened this issue Jan 13, 2025 · 0 comments
Labels
event-request Request for adding an event SCM GitHub request for SCM area

Comments

@Athon-dev
Copy link

Athon-dev commented Jan 13, 2025

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

@JesperSchulz JesperSchulz added event-request Request for adding an event SCM GitHub request for SCM area labels Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
event-request Request for adding an event SCM GitHub request for SCM area
Projects
None yet
Development

No branches or pull requests

2 participants