Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Error When updating to version 24

(2) ShareShare
ReportReport
Posted on by 29
I have a page which display  a Business Chart (Microsoft.Dynamics.Nav.Client.BusinessChart)  and this is the Code for the page:
 
page 71148 /XEE Net Pay per Department/
{
    PageType = CardPart;
    ApplicationArea = All;
    UsageCategory = Lists;
    SourceTable = /Business Chart Buffer/;
    Caption = 'Net to Pay per Department';

    layout
    {
        area(Content)
        {
            usercontrol(Chart; /Microsoft.Dynamics.Nav.Client.BusinessChart/)
            {

                trigger DataPointClicked(point: JsonObject)
                var
                    JsonTokenXvalueString: JsonToken;
                    XValueString: text;
                begin
                    if point.get('XValueString', JsonTokenXvalueString) then begin
                        XValueString := Format(JsonTokenXvalueString);
                        XValueString := DelChr(XValueString, '=', '/');
                        PayPerDepChartMgt.DrillDown(XValueString);
                    end;
                end;
                trigger AddInReady()
                var
                begin
                    UpdateChart();
                end;
                trigger Refresh()
                var
                    myInt: Integer;
                begin
                    UpdateChart();
                end;
            }
        }
    }
    actions
    {
        area(Processing)
        {
            action(/Chart Setup/)
            {
                ApplicationArea = All;
                Image = Setup;
                trigger OnAction();
                var
                begin
                    Page.RunModal(Page::/Pay Per Dep. Chart Setup/);
                    UpdateChart();
                end;
            }
            group(/Filtinring/)
            {
                action(/All/)
                {
                    ApplicationArea = All;
                    trigger OnAction()
                    begin
                        PayPerDepChartMgt.SetWorksheetFilters(FilterTypes::All, true);
                        UpdateChart();
                    end;
                }
                action(/This Month/)
                {
                    ApplicationArea = All;
                    trigger OnAction()
                    begin
                        PayPerDepChartMgt.SetWorksheetFilters(FilterTypes::/This Month/, true);
                        UpdateChart();
                    end;
                }
                action(/Previous Month/)
                {
                    ApplicationArea = All;
                    trigger OnAction()
                    begin
                        PayPerDepChartMgt.SetWorksheetFilters(FilterTypes::/Prev Month/, true);
                        UpdateChart();
                    end;
                }
                action(/This Year /)
                {
                    ApplicationArea = All;
                    trigger OnAction()
                    begin
                        PayPerDepChartMgt.SetWorksheetFilters(FilterTypes::/This Year/, true);
                        UpdateChart();
                    end;
                }
                action(/Previous Year/)
                {
                    ApplicationArea = All;
                    trigger OnAction()
                    var
                        T: Record System.Visualization./Business Chart Buffer/;
                    begin
                        PayPerDepChartMgt.SetWorksheetFilters(FilterTypes::/Perv Year/, true);
                        UpdateChart();

                    end;
                }
            }
        }
    }
    local procedure UpdateChart()
    var
        myInt: Integer;
    begin
        PayPerDepChartMgt.GenerateData(rec);
        Rec.Update(CurrPage.Chart);
    end;
    var
        PayPerDepChartMgt: Codeunit /XEE Pay Per Dept. Mgt./;
        FilterTypes: enum /Pay Per Dep. Chart Filters/;
}
 
This is the error 
Page/Pag71148.NetPayPerDepartment.al (154,25) - Error AL0135: There is no argument given that corresponds to the required formal parameter 'BusinessChartAddIn' of 'UpdateChart(ControlAddIn System.Integration.BusinessChart)'
  • Muaaz Deyab Profile Picture
    Muaaz Deyab 29 on at
    Error When updating to version 24
    @YuYo Thanks for the answer, this solved my problem even though it does not give any error or warning in vs code
  • Verified answer
    YuYo Profile Picture
    YuYo 11 on at
    Error When updating to version 24
    Hi Muaaz,
    I had the same error, but after renaming the procedure, the error stopped.
     
    - UpdateChart(); → UpdateChartExt();
    - local procedure UpdateChart() → local procedure UpdateChartExt()
     
    I think perhaps a procedure of the same name was introduced.
     
    Best Regards,
     
    Yu
  • Muaaz Deyab Profile Picture
    Muaaz Deyab 29 on at
    Error When updating to version 24
    Thanks for you answer
    I checked the Control add-in, and it is configured. 
  • Judy Profile Picture
    Judy Microsoft Employee on at
    Error When updating to version 24
    Hi Muaaz, Thanks for your reply.
    I think one of the effective ways is to debug the code and to see if the method has been defined in somewhere else.
    Hope it helps.
     
    Best Regards,
    Judy
  • Muaaz Deyab Profile Picture
    Muaaz Deyab 29 on at
    Error When updating to version 24
    Hi @Judy 

    This is the code 
    local procedure UpdateChart()
        var
            myInt: Integer;
        begin
            PayPerDepChartMgt.GenerateData(rec);
            Rec.Update(CurrPage.Chart);
        end;
    it does not require any parameters, The entire code of the page is shown in the question.
    It does not show any error in vscode and I can build the project normally 
  • Judy Profile Picture
    Judy Microsoft Employee on at
    Error When updating to version 24
    Hi, based on the error message, you can show us how the method UpdateChart() is defined.
    When you call the method, you missed the parameters (ControlAddIn System.Integration.BusinessChart) for it.
  • gdrenteria Profile Picture
    gdrenteria 14,483 Most Valuable Professional on at
    Error When updating to version 24
    Hi
    can you see if you have it configured on this page.
    BR
    GR

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,307 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans