Codeunit 402 Purchase Header Apply

Base Application, Microsoft.Purchases.Payables

Source AL, 80 lines

src/Layers/W1/BaseApp/Purchases/Payables/PurchaseHeaderApply.Codeunit.allines 9 to 24 of 80, Copyright (c) Microsoft Corporation. MIT

codeunit 402 "Purchase Header Apply"{    TableNo = "Purchase Header";    trigger OnRun()    begin        PurchHeader.Copy(Rec);        PayToVendorNo := PurchHeader."Pay-to Vendor No.";        VendLedgEntry.SetCurrentKey("Vendor No.", Open);        VendLedgEntry.SetRange("Vendor No.", PayToVendorNo);        VendLedgEntry.SetRange(Open, true);        OnRunOnAfterFilterVendLedgEntry(VendLedgEntry, PurchHeader);        if PurchHeader."Applies-to ID" = '' then            PurchHeader."Applies-to ID" := PurchHeader."No.";        if PurchHeader."Applies-to ID" = '' then            Error(

All 80 lines

Events 3 in 29

[IntegrationEvent] OnRunOnBeforeVendLedgEntryFindFirst(var VendorLedgerEntry: Record "Vendor Ledger Entry")17-29
[IntegrationEvent] OnAfterOnRun(var PurchHeader: Record "Purchase Header")new in 20
[IntegrationEvent] OnRunOnAfterFilterVendLedgEntry(var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PurchaseHeader: Record "Purchase Header")new in 21

All 5 events in 17-29

Changes 2 in 21

List17181920212223242526272829
Events32
[IntegrationEvent] OnRunOnAfterFilterVendLedgEntry(var VendorLedgerEntry: Record "Vendor Ledger Entry"; PurchaseHeader: Record "Purchase Header")20 to 20
gone
[IntegrationEvent] OnRunOnAfterFilterVendLedgEntry(var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PurchaseHeader: Record "Purchase Header")new in 21
added

All 5 changes in 17-29