Business Central AL ModuleInfo

In the AL Language, the programming language behind Microsoft Dynamics 365 Business Central, the ModuleInfo Data Type provides information about an application. I have often used the ModuleInfo returned by the NavApp to check specific application version information.
The NavApp DataType includes information about a NavApp and has a few methods that retrieve a ModuleInfo for the Calling, Current or Specific application.

local procedure ModuleInfoDemo(ModuleInfoReqType: enum "DVLPR ModuleInfo ReqType");
    var
        ModuleInfo: ModuleInfo;
    begin
        case ModuleInfoReqType of
            "DVLPR ModuleInfo ReqType"::Calling:
                NavApp.GetCallerModuleInfo(ModuleInfo);
            "DVLPR ModuleInfo ReqType"::Current:
                NavApp.GetCurrentModuleInfo(ModuleInfo);
            "DVLPR ModuleInfo ReqType"::Specific:
                NavApp.GetModuleInfo('{c512d720-63b9-4b26-b062-a0c09b4ed322}', ModuleInfo);
        end;

        PopulatePageFields(ModuleInfo);
    end;

    local procedure PopulatePageFields(ModuleInfo: ModuleInfo)
    var
        i: Integer;
        ModuleDependencyInfo: ModuleDependencyInfo;
        DependencyNames: Text;
        AppVersion,
        DataVersion : Version;

    begin
        AppVersion := ModuleInfo.AppVersion;
        DataVersion := ModuleInfo.DataVersion;
        Clear(DependencyNames);

        ModuleID := Format(ModuleInfo.Id);
        ModuleName := ModuleInfo.Name;
        ModulePublisher := ModuleInfo.Publisher;
        ModuleAppVersion := Format(AppVersion);
        ModuleDataVersion := Format(DataVersion);
        ModulePackageId := Format(ModuleInfo.PackageId);

        for i := 1 to ModuleInfo.Dependencies().Count() do begin
            ModuleInfo.Dependencies.Get(i, ModuleDependencyInfo);
            DependencyNames += ModuleDependencyInfo.Name + ',';
        end;

        ModuleDependency := DependencyNames;
    end;

For more information, see ModuleInfo Data Type and NavApp Data Type 

Note: The code listed in this article is for informational and demonstration purposes only. This content was created referencing Microsoft Dynamics 365 Business Central 2022 Wave 1

It’s Friday! – July 15

My First Homegrown Vegetable

My first homegrown vegetable and the best pepper that I have eaten!

View the Microsoft Dynamics 365 Business Central Tablet or Phone Client in a Browser

Microsoft Dynamics 365 Business Central allows users to access their data from a browser, tablet, or phone. The phone and tablet client provides users the flexibility to perform tasks while away from the browser.

Microsoft Dynamics 365 Business Central Phone ClientThere are several user experience differences between the different clients; The web client is intended for full application use, whereas the tablet and phone client are touch-optimized with the layout designed for the smaller screens.

In a mobile world, when developing a solution, it is crucial to consider the user experience with your Microsoft Dynamics 365 Business Central application on mobile devices. It is possible to open the tablet or phone client from a browser to make it easier to test a solution and consider the users’ experience. Depending on your application’s use and user experience, you may want a separate Role Center for mobile clients with pages with a carefully selected list of actions and fields.

To open the Microsoft Dynamics 365 Business Central tablet or phone client in a browser, append either “tablet” or “phone” after the instance of your Business Central installation.
For example:

Web Client: 
	http://bc20/BC/?tenant=default
	http://bc20/BC/?tenant=default&page=22

Tablet:
	 http://bc20/BC/tablet/?tenant=default
	http://bc20/BC/tablet/?tenant=default&page=22
Phone:
	http://bc20/BC/phone/?tenant=default
	http://bc20/BC/phone/?tenant=default&page=22

You can open the mobile client for a specific page, tenant, profile, company, report, or web client address by including the “tablet” or “phone” designator in the address after the instance name.

For more information, see the differences between the Business Central Mobile Apps.

Note: Information in this article is for informational and demonstration purposes only. This content was created referencing Microsoft Dynamics 365 Business Central 2022 Wave 1 

July 2022 Cumulative Updates for Dynamics 365 Business Central and Microsoft Dynamics NAV

The July updates for Microsoft Dynamics NAV and Microsoft Dynamics 365 Business Central are now available.

Before applying the updates, you should confirm that your implementation is ready for the upgrade and ensure compatibility with your modifications. Work with a Microsoft Partner to determine if you are ready and what is needed for you to apply the update.

Please note that SaaS customers will automatically be upgraded to 20.3 over the coming days/weeks and should receive an email notification when upgraded.

Direct links to the cumulative updates are listed here:

Dynamics 365 Business Central On-Premises 2022 Release Wave 1 Updates – Update 20.3 (July 2022)

Dynamics 365 Business Central On-Premises 2021 Release Wave 2 Updates – Update 19.9 (July 2022)

Dynamics 365 Business Central On-Premises 2021 Release Wave 1 Updates – Update 18.15 (July 2022)

Dynamics 365 Business Central On-Premises 2020 Release Wave 2 Updates – Update 17.17 (April 2022)

Dynamics 365 Business Central On-Premises 2020 Release Wave 1 Updates – Update 16.17 (October 2021)

Dynamics 365 Business Central On-Premises 2019 Release Wave 2 Updates – Update 15.17 (April 2021)

Dynamics 365 Business Central On-Premises Spring 2019 Updates – Update 37 (July 2022)

Dynamics 365 Business Central On-Premises October’18 Updates – Update 18 (April 2020)

Microsoft Dynamics NAV 2018 – Update 54 (July 2022)

Microsoft Dynamics NAV 2017 – Update Update 61 (January 2022)

Microsoft Dynamics NAV 2016 – Update 67 (July 2021)

Dynamics 365 Business Central: Setting the Report Layout for a Report

Microsoft Dynamics 365 Business Central supports the definition of multiple report layouts for a report. Layouts are defined as part of the Report, a Report Extension, or a Custom Report Layout.

Within Microsoft Dynamics 365 Business Central, there are two ways to set the Layout that is used by a report. The Report Layout is set using the Report Layout Selection or Report Layouts pages.

Report Layouts Page

  • Search for the Report Layouts and open the Report Layouts Page
  • Find and select the Report Layout in the list
  • Click the Set Default action at the top of the page.

    Report Layouts Page

Report Layout Selection Page

  • Search for the Report Layout Selection and open the Report Layout Selection Page
  • Set the Company value for the company that includes the Report
  • Find the Report in the list
    • If the Layout is a different type than the current Layout, select the Layout Type field, then choose the type of the Layout you want to set
  • Select Layout action from the Navigation pane
  • In the Report Layouts page, select the Layout, then select OK.

    Report Layout Selection

Note: Report Layouts are defined on a per-company basis; therefore, the same Report can be used in a tenant with different layouts defined for each company. This content was created referencing Microsoft Dynamics 365 Business Central 2022 Wave 1 

Classic Code Monkey

It’s fitting at times to resurrect the classics!

Code Monkey – Jonathan Coulton

Add Elements to the Role Explorer

Using the “Role Explorer” in Microsoft Dynamics 365 Business Central, you can get an overview of the features available to your Role. Each of the “Role Explorer” elements is an action, and a means to navigate Microsoft Dynamics 365 Business Central (I have heard this many times referred to as a “menu”).
Elements can be added to the “Role Explorer” by extending the Role Center being viewed. The following snippet is an example that extends the Business Manager Role to add an action that opens a page.

pageextension 50101 "Business Manager Ext" extends "Business Manager Role Center"
{
    actions
    {
        addafter(Deposits2)
        {
            action(MyCustomerList)
            {
                ApplicationArea = Basic, Suite;
                Caption = 'My Customer List';
                Image = Customer;
                Promoted = true;
                PromotedCategory = Process;
                RunObject = Page "Customer List";
                ToolTip = 'Display Customer List';
            }
        }
    }
}

Note: The code listed in this article is for demonstration purposes only 

Feature Management in Dynamics 365 Business Central

With each Major and Minor update of Microsoft Dynamics 365 Business Central, new features are added to the application.
Feature Management, within a Sandbox Environment, allows an administrator to enable the preview of upcoming features, allowing users access (to test) the features in a SandBox environment before they’re activated in a Production environment.

Search for Feature Management in a SandBox Dynamics 365 Business Central Tenant and select the Feature Management page. The Feature Management displays a list of features, their expected release period, and the option to enable the feature for all users.

Read more on Feature Management in Microsoft Dynamics 365 Business Central

HttpClient Extension Setting in Microsoft Dynamics 365 Business Central

While using a Microsoft Dynamics 365 Business Central Extension that uses the HTTPClient, you may have seen a dialog prompting, “The extension [extension name] by [publisher name] is making a request to an external service. Do you want to allow this request?”

The extension [extension name] by [publisher name] is making a request to an external service. Do you want to allow this request?

The option chosen when presented with this prompt is saved in the database and is editable (if you want to change your “Always” response) from the Extension Configuration page with the Allow HTTPClient Requests option. The option is helpful if you accidentally choose or want to go back and modify your choice.

To change the Allow HTTPClient Requests option for an Extension:

    • Search for Extension Management within Business Central
    • Find the extension in the list
    • Click the ellipsis to open the extension menu
    • Choose Configure
    • Slide the Allow HTTPClient Requests slider to the desired value