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

Set BCContainerHelper Default Configuration Values

BCContainerHelper is a PowerShell module that makes it easier to work with Microsoft Dynamics 365 Business Central and NAV Containers on Docker. The BCContainerHelper module contains many valuable functions that do much more than basic container management. I use this module in some form daily. Many BCContainerHelper module functions have switches and parameters; however, some use the default values with the options. 

You can configure BCContainerHelper default configuration values for use where applicable in the module functions.

This PowerShell script  demonstrates setting the configuration values for BCContainerHelper:

$bcContainerHelperConfig

$bcContainerHelperConfig.defaultNewContainerParameters = @{
"Accept_Eula" = $true
"Isolation" = "hyperv"
"UpdateHosts" = $true
}

$bcContainerHelperConfig | ConvertTo-Json | Set-Content "C:\ProgramData\BcContainerHelper\BcContainerHelper.config.json" 

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

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

The June 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.2 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.2 (June 2022)

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

Dynamics 365 Business Central On-Premises 2021 Release Wave 1 Updates – Update 18.14 (June 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 36 (June 2022)

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

Microsoft Dynamics NAV 2018 – Update 53 (June 2022)

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

Microsoft Dynamics NAV 2016 – Update 67 (July 2021)

Validate field pattern with Regular Expression in Dynamics 365 Business Central

When accepting user input in a field, it may be necessary to validate that the value matches a particular pattern. In early versions of Microsoft Dynamics NAV, you could use the RegEx dotNet libraries to validate input against a regular expression.

The RegEx dotNet libraries are not directly available in Dynamics 365 Business Central; however, there is a RegEx Codeunit that provides functionality to use regular expressions to match text patterns. The RegEx Codeunit implements an IsMatch procedure, which you can use to validate a value against a Regular Expression.
For example, to match a pattern of three alphabetic characters followed by a hyphen and then any three alphanumeric characters (Good: ABC-D1Q, Bad: 123-ADS), the following RegEx example implementation demonstrates the use of the IsMatch procedure:

 Adjust the pattern and code to satisfy your requirements. Text version of code listed below.

field(50101; "DVLPR RegEx Code"; Code[20])
        {
            Caption = 'RegEx Code';
            DataClassification = CustomerContent;

            trigger OnValidate()
            var
                Matches: Record Matches;
                Regex: Codeunit Regex;
                Pattern,
                Value : Text;
            begin
                Pattern := '[A-Z]{3}\-[0-9,A-Z]{3}

                if Regex.IsMatch("DVLPR RegEx Code", Pattern, 0) then
                    Message('Match')
                else
                    Error('No Match');
            end;
        }

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

Business Central 2022 Wave 1 – In-Client Performance Profiler

With each update of Dynamics 365 Business Central, Microsoft enhances what is often referred to as the base application and enhances the development environment. Dynamics 365 Business Central 2022 Wave 1 has several exciting new features in the development environment. One of the exciting features is the In-Client Performance Profiler

In 2021 release wave 2, Microsoft added the AL performance profiler to the Visual Studio Code AL experience. The performance profiler has empowered pro developers to investigate performance as part of developing new functionality and help troubleshoot performance issues in AL code in customer environments.

In 2022 release wave 1, Microsoft takes the performance profiler even further. The in-client performance profiler is a new app page reached on its own or from the Help & Support page.

One note is that it is only possible to capture the current session for the user who starts the profiler in this release wave.

The In-client performance profiler is accessible from the Help and Support Page or by searching for Performance Profiler in the Tell Me feature of Business Central.

This tool makes it easy for consultants and customer administrators to perform initial performance investigations without involving pro developers seamlessly.
Once the In-Client Performance Profiler page is open, click the start action, and perform the operation you’d like to profile from the user session. Once the process completes, use the stop action to end profiling and display the profiler results.

The profiler will display the call tree and the amount of time consumed by each app and process within the call tree. The profiler data is precious information when determining where there may be a performance issue.