ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] codeunit 444 "Purchase-Post Prepayments" - OnCodeOnBeforeThrowPreviewModeError

Open iltererdogan opened this issue 4 years ago • 2 comments

Hi,

Is it possible to add OnCodeOnBeforeThrowPreviewModeError publisher to "Purchase-Post Prepayments" codeunit?

    local procedure "Code"(var PurchHeader2: Record "Purchase Header"; DocumentType: Option Invoice,"Credit Memo")
            .
            .
            .
            .
            .
            Modify;
        end;


        // <<new
       OnCodeOnBeforeThrowPreviewModeError (PurchHeader, PurchInvHeader, PurchCrMemoHeader, GenJnlPostLine, PreviewMode);
       // >>new


        PurchHeader2 := PurchHeader;

        if PreviewMode then begin
            Window.Close;
            GenJnlPostPreview.ThrowError;
        end;

        OnAfterPostPrepayments(PurchHeader2, DocumentType, SuppressCommit, PurchInvHeader, PurchCrMemoHeader);
    end;

    // <<new
    [IntegrationEvent(false, false)]
    local procedure OnCodeOnBeforeThrowPreviewModeError (var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean)
    begin
    end;
    // >>new

iltererdogan avatar Jun 29 '22 06:06 iltererdogan

Hi, any update on this request?

iltererdogan avatar Sep 05 '22 11:09 iltererdogan

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.

Build ID: 46663.

JesperSchulz avatar Sep 19 '22 14:09 JesperSchulz