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] codeunit 550 "VAT Rate Change Conversion" - OnConvertBeforeStartConvert #14899

Closed pri-kise closed 2 years ago

pri-kise commented 2 years ago

Can we please get the following event (OnConvertBeforeStartConvert)after the ProgessWindow was opened?

local procedure Convert()
var
    GenProductPostingGroup: Record "Gen. Product Posting Group";
    TempGenProductPostingGroup: Record "Gen. Product Posting Group" temporary;
begin
    OnBeforeConvert(VATRateChangeSetup);

    VATRateChangeSetup.TestField("VAT Rate Change Tool Completed", false);
    if VATRateChangeConversion.IsEmpty() then
        Error(Text0015);
    if not AreTablesSelected then
        Error(Text0016);
    TestVATPostingSetup();
    ProgressWindow.Open(Text0001 + Text0002);
    OnConvertBeforeStartConvert(VATRateChangeSetup); //NEW Event
    with VATRateChangeSetup do begin
        ProgressWindow.Update;
        UpdateTable(
            DATABASE::"Gen. Product Posting Group",
            ConvertVATProdPostGrp("Update Gen. Prod. Post. Groups"), ConvertGenProdPostGrp("Update Gen. Prod. Post. Groups"));

        ...

        UpdateTables();

        OnBeforeFinishConvert(VATRateChangeSetup);

        GenProductPostingGroup.DeleteAll;
        if TempGenProductPostingGroup.Find('-') then
            repeat
                GenProductPostingGroup := TempGenProductPostingGroup;
                GenProductPostingGroup.Insert();
                TempGenProductPostingGroup.Delete();
            until TempGenProductPostingGroup.Next() = 0;
    end;

    ProgressWindow.Close;
...
end;
[IntegrationEvent(false, false)]
local procedure OnConvertBeforeStartConvert(var VATRateChangeSetup: Record "VAT Rate Change Setup")
begin
end;
JesperSchulz commented 2 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.