ALAppExtensions
ALAppExtensions copied to clipboard
[Event Request] codeunit 90 "Purch.-Post" - OnBeforePostInvoiceCheckCredit
Hello, would it be possible to add OnBeforePostInvoiceCheckCredit, event to codeunit 90 "Purch.-Post", like this:
local procedure PostInvoice(var PurchHeader: Record "Purchase Header")
...
if PurchSetup."Ext. Doc. No. Mandatory" or (GenJnlLineExtDocNo <> '') then
CheckExternalDocumentNumber(VendLedgEntry, PurchHeader);
IsHandled := false;
> OnBeforePostInvoiceCheckCredit(PurchHeader, HideProgressWindow, Window, TotalPurchLine, TotalPurchLineLCY, GenJnlLineDocType, GenJnlLineDocNo, GenJnlLineExtDocNo, SrcCode, IsHandled);//New Event
if not IsHandled then
// Post vendor entries
if GuiAllowed and not HideProgressWindow then
Window.Update(4, 1);
[IntegrationEvent(false, false)]
local procedure OnBeforePostInvoiceCheckCredit(var PurchHeader: Record "Purchase Header"; var HideProgressWindow: Boolean; var Window: Dialog; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var GenJnlLineDocType: Enum "Gen. Journal Document Type"; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; var SrcCode: Code[10]; var IsHandled: Boolean)
begin
end;
May I ask what is the purpose of this event and why you need this here? We cannot implement handled event here!
The purpose is to execute the following code only under certain conditions without modifying HideProgressWindow variable
I don't see how this event can help to solve this task! Can you provide full code of procedure with wanted changes? And explain how this is supposed to work?