Permanent link to this article: https://www.dvlprlife.com/2022/09/its-friday-september-09/
Sep 09 2022
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.
Permanent link to this article: https://www.dvlprlife.com/2022/09/dynamics-365-business-central-2022-wave-2-new-command-to-generate-or-update-al-permission-set/
Sep 08 2022
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.
Permanent link to this article: https://www.dvlprlife.com/2022/09/dynamics-365-business-central-2022-wave-2-switch-companies-across-environments/
Sep 07 2022
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.
Permanent link to this article: https://www.dvlprlife.com/2022/09/launch-in-a-specific-company-from-visual-studio-code/
Sep 06 2022
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 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)
Permanent link to this article: https://www.dvlprlife.com/2022/09/september-2022-cumulative-updates-for-dynamics-365-business-central-and-microsoft-dynamics-nav/
Sep 06 2022
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.
- Login to your Dynamics 365 Business Central admin center
- Select the Environments option
- Select + New to create a new Environment
- Enter a unique Environment Name in the Create Environment page
- Choose the Sandbox for the Type
- Select the desired Country
- Select the version labeled as Preview from the Version drop down list
- Click the Create button
The second option to access the environment is to create a Preview Docker Container using PowerShell.
- Install the BCContainerHelper Module if not installed.
- 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 ?
- Create a Preview Docker Container
- Open Visual Studio Code and open the Extension Page
- Select the ellipsis in the Extension menu and choose the “Install from VSIX…” menu option
- 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 - Click Install
- 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
Permanent link to this article: https://www.dvlprlife.com/2022/09/setup-a-public-preview-development-environment/
Permanent link to this article: https://www.dvlprlife.com/2022/09/its-friday-september-02/
Aug 31 2022
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
Permanent link to this article: https://www.dvlprlife.com/2022/08/securityfilter-option-type-and-security-filters/
Aug 29 2022
Service stopped? Restart it with PowerShell
Get-Service -Name "Microsoft*"

Get-Service -Name "Microsoft*" -Exclude "*WS*" | Format-Table -Property Name, Status, StartType, DisplayName
Get-Service -Name "Microsoft*" | Where-Object {$_.Status -eq "Stopped"} | Format-Table -Property Name, Status, StartType, DisplayName
Set-Service -Name MicrosoftDynamicsNavWS -Status Running
Get-Service -Name "MicrosoftDynamicsNav*" | Where-Object {$_.Status -eq "Stopped"} | Set-Service -Status Running
The stopped services with a name beginning with MicrosoftDynamicsNav start on the machine, unless there is something preventing the service from starting.
Note: The code and information discussed in this article is for informational and demonstration purposes only.
Permanent link to this article: https://www.dvlprlife.com/2022/08/service-stopped-restart-it-with-powershell/
Permanent link to this article: https://www.dvlprlife.com/2022/08/its-friday-august-26/