Dynamics 365 Business Central 2022 Wave 2 – Make entry of variant codes required

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 2 has several exciting Application features. One of the exciting features is to Make entry of variant codes required.

Within Dynamics 365 Business Central, Item Variants are one way to categorize items. For example, you can set up an item, and within that Item, have separate variants by color or size (you can also use item attributes to categorize items) or another characteristic. Item variants allow you to track and manage one Item but still track inventory by the variant.

In versions of Dynamics 365 Business Central before 2022 Wave 2, if item variants existed, it was up to the user to ensure that entry of the variant value on transactions that used an item with variants.

With the release of Dynamics 365 Business Central 2022 Wave 2, it is now possible for administrators to require that users specify the variant code on transactions for items with variants.

There is a new setting on the Inventory Setup, Variant Mandatory if Exists, which specifies the default (global) value that enforces the use of a variant code on transactions for items with variants.

There is also a new setting on the Item, Variant Mandatory if Exists, which can override the default value specified on the Inventory Setup.

Read more about the feature Make entry of variant codes required here.

Note: The code and information discussed in this article is for informational and demonstration purposes only. This content was created referencing Microsoft Dynamics 365 Business Central Public Preview 2022 Wave 2 online.

Dynamics 365 Business Central 2022 Wave 2 – Easily access setup pages for new apps

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 2 has several exciting Development features. One of the exciting features is to  Easily access setup pages for new apps.

In previous “wave” releases of Dynamics 365 Business Central, Microsoft focused on a customer’s onboarding experience. The goal of the onboarding experience is for customers and users to get into and use the application faster and easier. Focus on the onboarding experience also empowers partners to deliver a consistent experience to customers across applications. Partners can provide their applications with checklists, teaching tips, and configuration package artifacts.

As part of the continued effort to enhance the onboarding experience with Business Central 2022 Wave 2, a new menu action was added to the Extension Management page, allowing a developer to specify a page to run to set up the application.

When a developer references a setup page as part of the Guided Experience, it’ll be accessible from the Extension Management for the application.

Read more about the feature Easily access setup pages for new apps here.

Note: The code and information discussed in this article is for informational and demonstration purposes only. This content was created referencing Microsoft Dynamics 365 Business Central Public Preview 2022 Wave 2 online.

It’s Friday – September 09

Dynamics 365 Business Central 2022 Wave 2 – New command to generate or update AL permission set

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 2 has several exciting Development features. One of the exciting features is to  New command to generate or update AL permission set.

PermissionSets are the core to controlling access within Dynamics 365 Business Central. The Permission Set AL Object was introduced in Dynamics 365 Business Central 2021 Wave 1 and is used to describe the permissions on objects. Before the Permission Set AL Object, Permissions were defined as data, and the AL development language extension had a command to generate the Permission data as an XML file.

The release of Business Central 2022 Wave 2 introduces a new command, al.generatePermissionSetForExtensionObjects, to generate a Permission Set Object for the current project. When invoked, the al.generatePermissionSetForExtensionObjects command creates a new Permission Set Object, or if an existing Permission Set Object exists, it can be selected to update.
The command for generated a XML permission data file has been moved to the al.generatePermissionSetForExtensionObjectsAsXml command. Note that the definition of Permission Sets as data on the list for removal.

Read more about the feature New command to generate or update AL permission set here.

Note: The code and information discussed in this article is for informational and demonstration purposes only. This content was created referencing Microsoft Dynamics 365 Business Central Public Preview 2022 Wave 2 online.

Dynamics 365 Business Central 2022 Wave 2 – Switch companies across environments

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 2 has several exciting User experience features. One of the exciting features is to  Switch companies across environments.

Implementations of Dynamics 365 Business Central have more than one company or environment, and some users may need to access or compare data across these companies. The release of Business Central 2022 Wave 2 makes it easier for users to rapidly switch between the environments and companies they have access to.
Users can now see their current environment with a visual cue in the app bar and switch the context by selecting the cue.

Read more about the feature Switch companies across environments here.

Note: The code and information discussed in this article is for informational and demonstration purposes only. This content was created referencing Microsoft Dynamics 365 Business Central Public Preview 2022 Wave 2 online.

Dynamics 365 Business Central 2022 Wave 2 – Launch in a specific company from Visual Studio Code

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 2 has several exciting new features in the development environment. One of the exciting features is the Launch in a specific company from Visual Studio Code.

When publishing Dynamics 365 Business Central applications from within VS Code, the launch.json file specifies the configuration of the environment to which the extension is published and launched when you debug or test your app.
A new, optional parameter, startupCompany, exists in Dynamics 365 Business Central. The startupCompany specifies the company’s name to open after publishing the extension. Previously, you would need to change the company within the client environment.

Read more on startupCompany parameter here.

Note: The code and information discussed in this article is for informational and demonstration purposes only. This content was created referencing Microsoft Dynamics 365 Business Central Public Preview 2022 Wave 2.

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

The September 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.5 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.5 (September 2022)

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

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

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

Microsoft Dynamics NAV 2018 – Update 56 (September 2022)

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

Microsoft Dynamics NAV 2016 – Update 67 (July 2021)

Dynamics 365 Business Central: Setup a Public Preview Development Environment

As of this writing, Microsoft has a published schedule of two major annual updates of their Dynamics 365 Business Central ERP software product. These updates, referred to as “Waves,” are released in April and October. Approximately one month before the “Major Release,” Microsoft makes a “Public Preview” available to the public.

How do you access a Preview Environment (version) once its availability is announced?

You can access a “Public Preview” version of Dynamics 365 Business Central in two ways.

The first way to access the environment is to create a Sandbox Environment through the Dynamics 365 Business Central admin center.

  1. Login to your Dynamics 365 Business Central admin center
  2. Select the Environments option 
  3. Select + New to create a new Environment
  4. Enter a unique Environment Name in the Create Environment page
  5. Choose the Sandbox for the Type
  6. Select the desired Country
  7. Select the version labeled as Preview from the Version drop down list
  8. Click the Create button 

The second option to access the environment is to create a Preview Docker Container using PowerShell. 

  1. Install the BCContainerHelper Module if not installed.
  2. Create a new BC Container using the Preview Container artifacts. The following is an example script, which you should adjust for your environment and options. 
 ############################################################################################################

$containername = 'Preview'
$UserName = 'admin'
$Password = 'password'
$SecurePassword = ConvertTo-SecureString $Password -AsPlainText -Force
$Credential = New-Object System.Management.Automation.PSCredential ($UserName,$SecurePassword)

############################################################################################################

$artifactUrl = Get-BCArtifactUrl  -country "us" -select Latest -type Sandbox -storageAccount BcPublicPreview

New-BCContainer  `
    -accept_eula `
    -containerName $containername `
    -auth NavUserPassword `
    -artifactUrl $artifactUrl `
    -accept_outdated `
    -Verbose `
    -updateHosts `
    -alwayspull `
    -includeAL `
    -Credential $Credential `
    -isolation hyperv 

How do you access a Preview Development Environment ?

  1. Create a Preview Docker Container
  2. Open Visual Studio Code and open the Extension Page
  3. Select the ellipsis in the Extension menu and choose the “Install from VSIX…” menu option
  4. Browse for the ALLanguage.vsix file Note: The AL Language extension file is located in the ModernDev folder of the installation media for the Preview Docker Container. The Preview AL Language Extension may also be retrieved using the Get-AlLanguageExtensionFromArtifacts cmdlet. Example:
    $artifactUrl = Get-BCArtifactUrl -country "us" -select Latest -type Sandbox -storageAccount BcPublicPreview

    Get-AlLanguageExtensionFromArtifacts -artifactUrl $artifactUrl
  5. Click Install
  6. Reload to Refresh the AL Language Extension

Read more on how to prepare for major updates with preview environments here.

Note: The code and information discussed in this article is for informational and demonstration purposes only. This content was created referencing Microsoft Dynamics 365 Business Central Public Preview 2022 Wave 2

It’s Friday – September 02

Dynamics 365 Business Central: SecurityFilter Option Type and Security Filters

Dynamics 365 Business Central uses Security Filters to manage record-level security. A Security Filter limits the set of records in a table that a user can access.

When Security Filters are applied, the user’s access to data is limited. There may be instances where the desired code behavior may conflict with using Security Filters. The SecurityFilter Option Type allows a developer to specify how Security Filters apply to records in code. The SecurityFiltering Method sets or gets the SecurityFilter Option for a record instance.

SecurityFiltering Method Syntax:

[SecurityFiltering := ] Record.SecurityFiltering([SecurityFiltering: SecurityFilter])

The SecurityFilter Option Type has four options:

Validated:  This is the default value. Filters are respected, and an error is raised if access to a record outside the filtered set is attempted.

Filtered: Filters are respected, and records outside the filtered set do not exist for the user. 

Ignored: Security Filters are ignored for the record instance.

Disallowed: An error is raised if there is a security filter set for the record instance.

To demonstrate the SecurityFiltering on a record, I will use the Permission Set with the Security Filter discussed in a previous post.

With a Security Filter set for the user’s Permission Set, the SecurityFiltering Method use can be demonstrated

 

with the results

 

The example demonstrates the filtered record count with the Security Filter Filtered and with the Security Filter Ignored.

Read more on the SecurityFilter Option Type and SecurityFiltering Method.

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