microsoft / ALAppExtensions

Repository for collaboration on Microsoft AL application add-on and localization extensions for Microsoft Dynamics 365 Business Central.
MIT License
770 stars 610 forks source link

[Event Request] table 302 "Finance Charge Memo Header" - OnAfterAssignCustomerValues #13322

Closed Duizy05 closed 3 years ago

Duizy05 commented 3 years ago

We would like to add a new event OnBeforeModifyAllConfigLineWithEmptyPackageCode in the following trigger:

        trigger OnValidate()
        begin
            if CurrFieldNo = FieldNo("Customer No.") then
                if Undo then begin
                    "Customer No." := xRec."Customer No.";
                    exit;
                end;
            if "Customer No." = '' then
                exit;
            Cust.Get("Customer No.");
            Name := Cust.Name;
            "Name 2" := Cust."Name 2";
            Address := Cust.Address;
            "Address 2" := Cust."Address 2";
            "Post Code" := Cust."Post Code";
            City := Cust.City;
            County := Cust.County;
            Contact := Cust.Contact;
            "Country/Region Code" := Cust."Country/Region Code";
            "Language Code" := Cust."Language Code";
            "Currency Code" := Cust."Currency Code";
            "Shortcut Dimension 1 Code" := Cust."Global Dimension 1 Code";
            "Shortcut Dimension 2 Code" := Cust."Global Dimension 2 Code";
            "VAT Registration No." := Cust."VAT Registration No.";
            Cust.TestField("Customer Posting Group");
            "Customer Posting Group" := Cust."Customer Posting Group";
            "Gen. Bus. Posting Group" := Cust."Gen. Bus. Posting Group";
            "VAT Bus. Posting Group" := Cust."VAT Bus. Posting Group";
            "Tax Area Code" := Cust."Tax Area Code";
            "Tax Liable" := Cust."Tax Liable";
            Validate("Fin. Charge Terms Code", Cust."Fin. Charge Terms Code");

            OnAfterAssignCustomerValues(Rec, Cust); //A108F0013.Event

            CreateDim(DATABASE::Customer, "Customer No.");
        end;

Event Signature:

[IntegrationEvent(false, false)]
local procedure OnAfterAssignCustomerValues(var FinanceChargeMemoHeader: Record "Finance Charge Memo Header"; Customer: Record "Customer")
begin
    //A108F0013.Event
end;
JesperSchulz commented 3 years ago

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.