[Event Request] codeunit 90 "Purch.-Post" - OnPostInvoiceOnBeforePostVendorEntry
Hello, can you please add a new Event OnPostInvoiceOnBeforePostVendorEntry in codeunit 90 "Purch.-Post" ?
// Check External Document number
if PurchSetup."Ext. Doc. No. Mandatory" or (GenJnlLineExtDocNo <> '') then
CheckExternalDocumentNumber(VendLedgEntry, PurchHeader);
// Post vendor entries
if GuiAllowed and not HideProgressWindow then
Window.Update(4, 1);
IsHandled := false;
OnPostInvoiceOnBeforePostVendorEntry(PurchHeader, TotalPurchLine, GenJnlPostLine, TotalPurchLineLCY, SuppressCommit, VendLedgEntry, IsHandled);
if IsHandled then
exit;
[IntegrationEvent(false, false)]
local procedure OnPostInvoiceOnBeforePostVendorEntry(PurchHeader: Record "Purchase Header"; TotalPurchLine: Record "Purchase Line"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; TotalPurchLineLCY: Record "Purchase Line"; CommitIsSupressed: Boolean; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var IsHandled: Boolean)
begin
end;
No, this procedure is obsoleted and already have this event for the same purpose
IsHandled := false;
OnPostVendorEntryOnBeforeInitNewLine(PurchHeader, TotalPurchLine, TotalPurchLineLCY, GenJnlLineDocType, GenJnlLineDocNo, GenJnlLineExtDocNo, SrcCode, GenJnlPostLine, IsHandled);
if IsHandled then
exit;
We still need this event (Issue #23317), because we want, in some specific cases, to skip posting some documents in PostInvoice procedure. The naming of the event was confusing for Microsoft, that is why they suggested to use another event, which is not useful at all 😊 Unfortunately is difficult to find a more meaningful name in that specific place. How do you think we should proceed? Renaming the event and creating a new request, or explaining them?