ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Codeunit 92 "Purch.-Post + Print" - OnBeforeConfirmPost2

Open Pepito-lab opened this issue 5 years ago • 3 comments

Hi, would it be possible to get an event OnBeforeConfirmPost2 codeunit 92 "Purch.-Post + Print", like this :

    local procedure ConfirmPost(var PurchHeader: Record "Purchase Header"; DefaultOption: Integer): Boolean
    var
        ConfirmManagement: Codeunit "Confirm Management";
        Selection: Integer;
        IsHandled: Boolean;
        Result: Boolean;
    begin
        IsHandled := false;
        OnBeforeConfirmPost2(PurchHeader, IsHandled,Result);
        if not IsHandled then
            exit(Result);
    [IntegrationEvent(false, false)]
    local procedure OnBeforeConfirmPost2(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean; var Result: Boolean)
    begin
    end;

Thanks

Pepito-lab avatar Jan 29 '21 15:01 Pepito-lab

There is a OnBeforeConfirmPost() which allows to redefine/hide confirmation. Can't you use it?

StanPesotskiy avatar Feb 03 '21 07:02 StanPesotskiy

Hi, no because I want to skip all this procedure. Thanks.

Pepito-lab avatar Feb 08 '21 08:02 Pepito-lab

I don't get it. If you subscribe to OnBeforeConfirmPost and set HideDialog := true then ConfirmPost() will not be called.

        OnBeforeConfirmPost(PurchHeader, HideDialog, IsHandled, DefaultOption);
        if IsHandled then
            exit;

        if not HideDialog then
            if not ConfirmPost(PurchHeader, DefaultOption) then
                exit;

StanPesotskiy avatar Feb 08 '21 11:02 StanPesotskiy