Skip to main content What is Dynamics 365? Guided tours Customer stories Try our products CRM ERP Sales Service Sales Customer Insights Customer Service Contact Center Field Service Supply Chain Management Commerce Finance Project Operations Human Resources Business Central Pricing Business application topics Training & certifications Migrate to the cloud Documentation Events Dynamics 365 Blog Product updates Onboarding and implementation Community Find a partner Software Development Companies Partner resources Microsoft Marketplace Product documentation Technical support On-premises product support Contact us Try for free Sign in
  • 1 min read

Changing the language at runtime in X++


We recently had a case where the customer wanted to change the language being used for a given AX user at runtime.  The customer had sorted out how to change the language displayed in forms and reports but the buttons on the navigation pane were not getting updated.  Here is a way to handle this scenario:

In the setSetup method of the SysUserSetup form within the if clause add the following:

        if (infolog.language() != userinfo.language)
        {
            infolog.language(userinfo.language);
            infolog.navPane().loadStartupButtons();
        }

Get started with Dynamics 365

Drive more efficiency, reduce costs, and create a hyperconnected business that links people, data, and processes across your organization—enabling every team to quickly adapt and innovate.