ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event-request] Sales/Purchase Invoice Header - OnBeforeCheckCorrectedDocumentExist

Open asaez85 opened this issue 5 years ago • 3 comments

We need a new event with a "IsHandled" parameter: image

Same situation occurs in Purchase Invoice Header.

Thank you

asaez85 avatar Nov 23 '21 11:11 asaez85

Please always put the full detailed signature of the requested events and the parameters passed in the call. You help us implementing the requests faster when your request contains AL code copied from VSCode instead of screenshots.

Oleg-Romashkov avatar Nov 30 '21 04:11 Oleg-Romashkov

Table: 112 "Sales Invoice Header" - "CheckCorrectedDocumentExist" procedure:

    procedure CheckCorrectedDocumentExist(CustNo: Code[20]; CorrInvNo: Code[20])
    //event-request
    var
        IsHandled: Boolean;
    begin
        OnBeforeCheckCorrectedDocumentExist(Custno,CorrInvNo,IsHandled);
        if IsHandled then
            exit;
    //event-request

        SetRange("Bill-to Customer No.", CustNo);
        SetRange("No.", CorrInvNo);
        if not FindFirst then
            Error(CorrInvDoesNotExistErr, CorrInvNo);
    end;

Integration event:

    [IntegrationEvent(false, false)]
    local procedure OnBeforeCheckCorrectedDocumentExist(CustNo: Code[20]; CorrInvNo: Code[20];var IsHandled: Boolean)
    begin
    end;

Table: 122 "Purch. Inv. Header" - "CheckCorrectedDocumentExist" procedure:

    procedure CheckCorrectedDocumentExist(VendNo: Code[20]; CorrInvNo: Code[20])
    //event-request
    var
        IsHandled: Boolean;
    begin
        OnBeforeCheckCorrectedDocumentExist(VendNo,CorrInvNo,IsHandled);
        if IsHandled then
            exit;
    //event-request

        SetRange("Pay-to Vendor No.", VendNo);
        SetRange("No.", CorrInvNo);
        if not FindFirst then
            Error(CorrInvDoesNotExistErr, CorrInvNo);
    end;

Integration event:

    [IntegrationEvent(false, false)]
    local procedure OnBeforeCheckCorrectedDocumentExist(VendNo: Code[20]; CorrInvNo: Code[20];var IsHandled: Boolean)
    begin
    end;

asaez85 avatar Nov 30 '21 14:11 asaez85

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.

JesperSchulz avatar Dec 01 '21 07:12 JesperSchulz