I was sure this was an obvious topic until today, but after receiving so many desperate questions from partners that are unable to change the license for an on-premise Dynamics 365 Business Central Wave 2 database for development purposes, I’ve decided to spent few minutes for sharing this.
When you install Dynamics 365 Business Central on-premise Wave 2 (or version 15) release, you’ll see that the setup permits you to select the following things:
and when installed you have the following 3 applications:
As you can see, there’s no more the classic CSIDE Development Environment but now you have only the web client. In the previous versions (where the Development Environment was still available) you could change the license by going to Tool|License Information|Change and then select your developer license.
Now you cannot do this and the work for “switching” license from a customer license to a developer license is a bit more tricky.
What you can do is:
- Create two server instances that points to the same database by using New-NAVServerInstance cmdlet (for example PROD as the production service and DEV as the development service only used by the partner). Leave the DEV server inactive and activate it only when you need it.
- Create two web client instances by using the New-NAVWebServerInstance cmdlet that points to PROD and DEV respectively (different urls)
- Import the customer license by using the following cmdlet:
Import-NAVServerLicense 'MicrosoftDynamicsNavServer$PROD' -LicenseData ([Byte]$(Get-Content -Path "c:\YourLicenseFolder\CustomerLicenseFile.flf" -Encoding Byte))
When you want to change the license (temporary change for development purposes):
4. Import the partner license by using the DEV server instance:
Import-NAVServerLicense 'MicrosoftDynamicsNavServer$DEV' -LicenseData ([Byte]$(Get-Content -Path "c:\YourLicenseFolder\PartnerLicenseFile.flf" -Encoding Byte))
5. Start the DEV service and connect with your partner account to the DEV endpoint
6. Import the customer license to the PROD endpoint with the cmdlet described at point 3.
In this way, the DEV endpoint runs with the partner license (temporary loaded) and the PROD endpoint runs with the customer license (service caches the license). This is necessary because the Import-NAVServerLicense cmdlet imports the license in the database. You can do your work and then stop the DEV endpoint when finished.
Another possible option that permits you to avoid this “license switch” is to use Runtime Packages. A Runtime Package permits you to distribute the final artifacts of your extension without distributing your AL code and (expecially) permits you to install the extension on a server without using the developer license (the license is checked only on the server where the runtime package is generated).
To create a Runtime Package for your extension, you can use the following cmdlet:
Get-NAVAppRuntimePackage -ServerInstance YourServerInstance -AppName 'Your App Name' -Version 22.214.171.124 -ExtensionPath 'Path of your .app file'
When you have the runtime package, you can then publish the extension with Publish-NAVApp and Install-NAVApp cmdlets.
The only limitation is that the extension’s debugging experience is poor, because source code is not available.