Skip to content

[Event Request] Table 5050 Contact - OnBeforeCreateVendor2 #28941

Description

@KlaasKleermaker

Why do you need this change?

In 4PS Construct we need to be able to create a vendor based on a contact when there is no vendor template at all.

Describe the request

Dear ALAppExtensions team,

On behalf of 4PS I would like to request integration event 'OnBeforeCreateVendor2' to be added to procedure CreateVendor in table 5050 Contact.

    procedure CreateVendor() VendorNo: Code[20]
    var
        VendorTempl: Record "Vendor Templ.";
        VendorTemplMgt: Codeunit "Vendor Templ. Mgt.";
        IsHandled: Boolean; //new
    begin
        OnBeforeCreateVendor2(Rec, VendorNo, IsHandled); //new
        if IsHandled then //new
            exit; //new

        if not CheckIfVendorTempleExist() then begin
            if GuiAllowed() then
                Message(StrSubstNo(VendorTemplNotFoundMsg, Rec.Type));
            exit;
        end;

        if VendorTemplMgt.SelectVendorTemplateFromContact(VendorTempl, Rec) then
            exit(CreateVendorFromTemplate(VendorTempl.Code));
    end;

    [IntegrationEvent(false, false)]
    local procedure OnBeforeCreateVendor2(var Contact: Record Contact; var VendorNo: Code[20]; var IsHandled: Boolean)
    begin
        //new
    end;

Internal work item: AB#596578

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    SCMGitHub request for SCM areaevent-requestRequest for adding an eventships-in-future-updateFix ships in a future update

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions