{"title":"Codeunit 816 Purch. Post Invoice, obsolete","url":"https://jonas-paprotka.de/ref/codeunit/816-purch-post-invoice/obsolete/","author":"JOP-AL","license":"Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/","subject":"Microsoft Dynamics 365 Business Central","checked":"2026-11-20","changed":"2026-10-17","object":{"type":"codeunit","id":816,"name":"Purch. Post Invoice","app":"Base Application","versions":"19-29","url":"https://jonas-paprotka.de/ref/codeunit/816-purch-post-invoice/","json":"https://jonas-paprotka.de/ref/codeunit/816-purch-post-invoice.json"},"aspect":"obsolete","total":45,"rows":[{"kind":"event","name":"OnAfterCalcInvoiceDiscountPosting(PurchHeader: Record \"Purchase Header\"; PurchLine: Record \"Purchase Line\"; PurchLineACY: Record \"Purchase Line\"; InvoicePostingBuffer: Record \"Invoice Posting Buffer\")","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnAfterCalcLineDiscountPosting(PurchHeader: Record \"Purchase Header\"; PurchLine: Record \"Purchase Line\"; PurchLineACY: Record \"Purchase Line\"; InvoicePostingBuffer: Record \"Invoice Posting Buffer\")","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnAfterCreatePostedDeferralSchedule(PurchLine: Record \"Purchase Line\"; var PostedDeferralHeader: Record \"Posted Deferral Header\")","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnAfterGetPurchAccount(PurchLine: Record \"Purchase Line\"; GenPostingSetup: Record \"General Posting Setup\"; var SalesAccountNo: Code[20])","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnAfterInitTotalAmounts(PurchLine: Record \"Purchase Line\"; PurchLineACY: Record \"Purchase Line\"; var TotalVAT: Decimal; var TotalVATACY: Decimal; var TotalAmount: Decimal; var TotalAmountACY: Decimal; var TotalVATBase: Decimal; var TotalVATBaseACY: Decimal)","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnAfterPrepareGenJnlLine(var GenJnlLine: Record \"Gen. Journal Line\"; PurchHeader: Record \"Purchase Header\"; InvoicePostingBuffer: Record \"Invoice Posting Buffer\")","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnAfterSetJobLineFilters(var JobPurchLine: Record \"Purchase Line\"; InvoicePostingBuffer: Record \"Invoice Posting Buffer\")","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnAfterSetApplyToDocNo(var GenJournalLine: Record \"Gen. Journal Line\"; PurchaseHeader: Record \"Purchase Header\")","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnBeforeCalcInvoiceDiscountPosting(PurchHeader: Record \"Purchase Header\"; PurchLine: Record \"Purchase Line\"; PurchLineACY: Record \"Purchase Line\"; var InvoicePostingBuffer: Record \"Invoice Posting Buffer\"; var IsHandled: Boolean)","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnBeforeCalcLineDiscountPosting(PurchHeader: Record \"Purchase Header\"; PurchLine: Record \"Purchase Line\"; PurchLineACY: Record \"Purchase Line\"; var InvoicePostingBuffer: Record \"Invoice Posting Buffer\"; var IsHandled: Boolean)","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnBeforeCalculateVATAmounts(PurchHeader: Record \"Purchase Header\"; var InvoicePostingBuffer: Record \"Invoice Posting Buffer\"; var IsHandled: Boolean)","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnBeforeInitGenJnlLine(var GenJnlLine: Record \"Gen. Journal Line\"; PurchHeader: Record \"Purchase Header\"; InvoicePostingBuffer: Record \"Invoice Posting Buffer\"; var IsHandled: Boolean)","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnBeforeInitGenJnlLineAmountFieldsFromTotalPurchLine(var GenJnlLine: Record \"Gen. Journal Line\"; var PurchHeader: Record \"Purchase Header\"; var TotalPurchLine: Record \"Purchase Line\"; var TotalPurchLineLCY: Record \"Purchase Line\"; var IsHandled: Boolean)","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnBeforePostLines(PurchHeader: Record \"Purchase Header\"; var TempInvoicePostingBuffer: Record \"Invoice Posting Buffer\" temporary)","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnPostBalancingEntryOnAfterGenJnlPostLine(var GenJnlLine: Record \"Gen. Journal Line\"; var PurchHeader: Record \"Purchase Header\"; var TotalPurchLine: Record \"Purchase Line\"; var TotalPurchLineLCY: Record \"Purchase Line\"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var GenJnlPostLine: Codeunit \"Gen. Jnl.-Post Line\")","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnPostLedgerEntryOnAfterGenJnlPostLine(var GenJnlLine: Record \"Gen. Journal Line\"; var PurchHeader: Record \"Purchase Header\"; var TotalPurchLine: Record \"Purchase Line\"; var TotalPurchLineLCY: Record \"Purchase Line\"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var GenJnlPostLine: Codeunit \"Gen. Jnl.-Post Line\")","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnPostBalancingEntryOnBeforeGenJnlPostLine(var GenJnlLine: Record \"Gen. Journal Line\"; var PurchHeader: Record \"Purchase Header\"; var TotalPurchLine: Record \"Purchase Line\"; var TotalPurchLineLCY: Record \"Purchase Line\"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var GenJnlPostLine: Codeunit \"Gen. Jnl.-Post Line\")","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnPostLedgerEntryOnBeforeGenJnlPostLine(var GenJnlLine: Record \"Gen. Journal Line\"; var PurchHeader: Record \"Purchase Header\"; var TotalPurchLine: Record \"Purchase Line\"; var TotalPurchLineLCY: Record \"Purchase Line\"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var GenJnlPostLine: Codeunit \"Gen. Jnl.-Post Line\")","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnBeforePrepareLine(PurchHeader: Record \"Purchase Header\"; PurchLine: Record \"Purchase Line\"; PurchLineACY: Record \"Purchase Line\"; var IsHandled: Boolean)","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnBeforePrepareLineFADiscount(var InvoicePostingBuffer: Record \"Invoice Posting Buffer\"; GenPostingSetup: Record \"General Posting Setup\"; var IsHandled: Boolean)","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnBeforePostLedgerEntry(var PurchHeader: Record \"Purchase Header\"; TotalPurchLine: Record \"Purchase Line\"; TotalPurchLineLCY: Record \"Purchase Line\"; InvoicePostingParameters: Record \"Invoice Posting Parameters\"; var GenJnlPostLine: Codeunit \"Gen. Jnl.-Post Line\"; var IsHandled: Boolean)","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnBeforeTempDeferralLineInsert(var TempDeferralLine: Record \"Deferral Line\" temporary; DeferralLine: Record \"Deferral Line\"; PurchLine: Record \"Purchase Line\"; var DeferralCount: Integer; var TotalDeferralCount: Integer)","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnCalculateVATAmountsOnAfterGetReverseChargeVATPostingSetup(var VATPostingSetup: Record \"VAT Posting Setup\")","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnPrepareLineOnAfterAssignAmounts(PurchLine: Record \"Purchase Line\"; PurchLineACY: Record \"Purchase Line\"; var TotalAmount: Decimal; var TotalAmountACY: Decimal)","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnPrepareLineOnAfterSetAmounts(var InvoicePostingBuffer: Record \"Invoice Posting Buffer\"; PurchLine: Record \"Purchase Line\")","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnPrepareLineOnAfterFillInvoicePostingBuffer(var InvoicePostingBuffer: Record \"Invoice Posting Buffer\"; PurchLine: Record \"Purchase Line\")","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnPrepareLineOnBeforeAdjustTotalAmounts(PurchLine: Record \"Purchase Line\"; var TotalAmount: Decimal; var TotalAmountACY: Decimal; UseDate: Date)","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnPrepareLineOnBeforeSetAccount(PurchHeader: Record \"Purchase Header\"; PurchLine: Record \"Purchase Line\"; var SalesAccount: Code[20])","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnPrepareLineOnBeforeSetAmounts(PurchLine: Record \"Purchase Line\"; PurchLineACY: Record \"Purchase Line\"; var InvoicePostingBuffer: Record \"Invoice Posting Buffer\"; var TotalVAT: Decimal; var TotalVATACY: Decimal; var TotalAmount: Decimal; var TotalAmountACY: Decimal; var TotalVATBase: Decimal; var TotalVATBaseACY: Decimal; var IsHandled: Boolean)","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnPrepareLineOnAfterSetInvoiceDiscAccount(PurchLine: Record \"Purchase Line\"; GenPostingSetup: Record \"General Posting Setup\"; var InvoicePostingBuffer: Record \"Invoice Posting Buffer\"; var TempInvoicePostingBuffer: Record \"Invoice Posting Buffer\" temporary)","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnPrepareLineOnAfterSetLineDiscAccount(PurchLine: Record \"Purchase Line\"; GenPostingSetup: Record \"General Posting Setup\"; var InvoicePostingBuffer: Record \"Invoice Posting Buffer\"; var TempInvoicePostingBuffer: Record \"Invoice Posting Buffer\" temporary)","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnPrepareLineOnBeforeCalcInvoiceDiscountPosting(var TempInvoicePostingBuffer: Record \"Invoice Posting Buffer\"; var nvoicePostingBuffer: Record \"Invoice Posting Buffer\"; PurchHeader: Record \"Purchase Header\"; PurchLine: Record \"Purchase Line\"; TotalVAT: Decimal; TotalVATACY: Decimal; TotalAmount: Decimal; TotalAmountACY: Decimal; var IsHandled: Boolean)","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnPrepareLineOnBeforeCalcLineDiscountPosting(var TempInvoicePostingBuffer: Record \"Invoice Posting Buffer\"; var nvoicePostingBuffer: Record \"Invoice Posting Buffer\"; PurchHeader: Record \"Purchase Header\"; PurchLine: Record \"Purchase Line\"; TotalVAT: Decimal; TotalVATACY: Decimal; TotalAmount: Decimal; TotalAmountACY: Decimal; var IsHandled: Boolean)","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnPostLinesOnAfterGenJnlLinePost(var GenJnlLine: Record \"Gen. Journal Line\"; PurchHeader: Record \"Purchase Header\"; TempInvoicePostingBuffer: Record \"Invoice Posting Buffer\"; var GenJnlPostLine: Codeunit \"Gen. Jnl.-Post Line\"; PreviewMode: Boolean; SuppressCommit: Boolean; GLEntryNo: Integer)","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnPostLinesOnBeforeGenJnlLinePost(var GenJnlLine: Record \"Gen. Journal Line\"; PurchHeader: Record \"Purchase Header\"; TempInvoicePostingBuffer: Record \"Invoice Posting Buffer\"; var GenJnlPostLine: Codeunit \"Gen. Jnl.-Post Line\"; PreviewMode: Boolean; SuppressCommit: Boolean)","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnPrepareGenJnlLineOnAfterCopyToGenJnlLine(var GenJnlLine: Record \"Gen. Journal Line\"; PurchHeader: Record \"Purchase Header\"; InvoicePostingBuffer: Record \"Invoice Posting Buffer\")","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnPrepareLineOnAfterSetInvoiceDiscountPosting(PurchHeader: Record \"Purchase Header\"; PurchLine: Record \"Purchase Line\"; var InvoiceDiscountPosting: Boolean)","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnPrepareLineOnAfterSetLineDiscountPosting(PurchHeader: Record \"Purchase Header\"; PurchLine: Record \"Purchase Line\"; var LineDiscountPosting: Boolean)","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnPrepareLineOnAfterPrepareDeferralLine(PurchLine: Record \"Purchase Line\"; InvoicePostingBuffer: Record \"Invoice Posting Buffer\"; UseDate: Date; InvDefLineNo: Integer; DeferralLineNo: Integer; SuppressCommit: Boolean)","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnPrepareLineOnAfterUpdateInvoicePostingBuffer(PurchHeader: Record \"Purchase Header\"; PurchLine: Record \"Purchase Line\"; InvoicePostingBuffer: Record \"Invoice Posting Buffer\"; var TempInvoicePostingBuffer: Record \"Invoice Posting Buffer\" temporary)","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnPrepareLineOnBeforePrepareDeferralLine(PurchLine: Record \"Purchase Line\"; InvoicePostingBuffer: Record \"Invoice Posting Buffer\"; UseDate: Date; InvDefLineNo: Integer; DeferralLineNo: Integer; SuppressCommit: Boolean)","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnPrepareLineOnBeforePreparePurchase(PurchHeader: Record \"Purchase Header\"; PurchLine: Record \"Purchase Line\")","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnPrepareLineOnBeforeSetInvoiceDiscAccount(PurchLine: Record \"Purchase Line\"; GenPostingSetup: Record \"General Posting Setup\"; var InvDiscAccount: Code[20]; var IsHandled: Boolean)","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnPrepareLineOnBeforeSetLineDiscAccount(PurchLine: Record \"Purchase Line\"; GenPostingSetup: Record \"General Posting Setup\"; var InvDiscAccount: Code[20]; var IsHandled: Boolean)","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22},{"kind":"event","name":"OnPrepareDeferralLineOnBeforeDeferralPostingBufferPrepareInitialAmounts(var DeferralPostBuffer: Record \"Deferral Posting Buffer\"; PurchHeader: Record \"Purchase Header\"; PurchLine: Record \"Purchase Line\"; AmountLCY: Decimal; AmountACY: Decimal; RemainAmtToDefer: Decimal; RemainAmtToDeferACY: Decimal; DeferralAccount: Code[20]; PurchAccount: Code[20])","obsolete":{"state":"Pending","reason":"Replaced by run event procedure in codeunit Purch. Post Invoice Events","tag":"20.0"},"obsoleteSince":20,"last":22}]}