ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[EventRequest] Codeunit 5057 VendCont-Update - OnBeforeOnInsert

Open EvaCegeka opened this issue 4 years ago • 1 comments

Hello,

Inside procedure OnInsert of codeunit 5057 a check goes off on RMSetup."Bus. Rel. Code for Vendors". Before this check goes off we want to be able to do an additional check and exit the procedure if necessary. For this we would like to request an event (OnBeforeOnInsert) with an IsHandled pattern like so:

procedure OnInsert(var Vend: Record Vendor)
    var
        IsHandled: Boolean;
    begin
        IsHandled := false;
        OnBeforeOnInsert(Vend, IsHandled);
        if IsHandled then
            exit;

        RMSetup.Get();
        if RMSetup."Bus. Rel. Code for Vendors" = '' then
            exit;

        InsertNewContact(Vend, true);
    end;
    [IntegrationEvent(false, false)]
    local procedure OnBeforeOnInsert(Vend: Record Vendor; var IsHandled: Boolean)
    begin
    end;

Thank you in advance for your consideration.

EvaCegeka avatar Apr 05 '22 09:04 EvaCegeka

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 Apr 12 '22 12:04 JesperSchulz