When deployed on-premises, create a new database, build it up with the Microsoft System Application, and complete it with the Food Manufacturing & Distribution Application.
Start by completing an installation of the set obtained from from Microsoft (if you have any questions on this, contact us). Once the installation completes and you have access through a modern client to the CRONUS demo company, follow these steps. You can copy and paste the code to ISE.
Note
The CreateDatabase.ps1 script assumes that the AL Development Environment is installed from the Dynamics 365 Microsoft Dynamics 365 Business Central DVD. Copy the path to the $systemApp variable. The $systemApplication variable must point to the path from where Setup was run.
The CreateDatabase.ps1 script assumes a SQL server without instances. When specifying the installation options in the Dynamics 365 Microsoft Dynamics 365 Business Central setup, leave the database instance blank.
Run Windows PowerShell ISE as administrator from your desktop.
CreateDatabase.ps1
# Import the D365 BC Management modules in ISE:Import-Module"C:\Program Files\Microsoft Dynamics 365 Business Central\150\Service\Microsoft.Dynamics.Nav.Apps.Management.psd1"Import-Module"C:\Program Files\Microsoft Dynamics 365 Business Central\150\Service\Microsoft.Dynamics.Nav.Management.psd1"# Define the variables for the script (current values are provided as examples): $serverInstance = 'BC150'$databaseName = "ToIncrease"$databaseServer = "localhost"$applicationVersion = '15.2.39040.0'$applicationFamily = 'W1'$systemApp = "C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\150\AL Development Environment\System.app"$systemApplication = "C:\ ... \Applications\System Application\Source\Microsoft_System Application.app"$companyName = 'Food Basic BC15'# Create a new database: New-NAVApplicationDatabase-DatabaseName$databaseName-DatabaseServer$databaseServerSet-NAVServerConfiguration-KeyName DatabaseName -KeyValue$databaseName-ServerInstance$serverInstanceRestart-NAVServerInstance-ServerInstance$serverInstance# Connect the new database to the Business Central service: Set-NAVApplication-ApplicationVersion$applicationVersion-ServerInstance$serverInstance-ForceSet-NAVApplication-ApplicationFamily$applicationFamily-ServerInstance$serverInstance-ForceSync-NAVTenant-ServerInstance$serverInstance-Mode Sync # Import License FileImport-NAVServerLicense-LicenseFile c:\sw\license\BC-15-DEV.flf -ServerInstance BC150 Restart-NAVServerInstance-ServerInstance$serverInstance# Publish the Microsoft system application in the database: Publish-NAVApp-Path$systemApp-ServerInstance$serverInstance-PackageType SymbolsOnly Publish-NAVApp-Path$systemApplication-ServerInstance$serverInstanceSync-NAVApp-Name"System Application"-ServerInstance$serverInstance# Install the Microsoft system application in the database and create a new Company: Install-NAVApp-Path$systemApplication-ServerInstance$serverInstanceNew-NAVCompany-CompanyName$companyName-ServerInstance$serverInstance-CompanyDisplayName$companyName
Install FOODapps.ps1
To prepare for this script, download the STAEDEAN Food Manufacturing & Distribution Artifacts and unzip the downloaded folder on your desktop. Update your local path in the script (\ ... ).
Note
Upon successful completion of the script, Extension Management lists the published and installed extensions. The System Application shows the Dynamics 365 Microsoft Dynamics 365 Business Central build number, while the STAEDEAN applications show the STAEDEAN build number. Example: 15.3.41357.0.
15 is the Microsoft Dynamics 365 Business Central major version: must be the same between Microsoft and STAEDEAN.
3 is the Microsoft Dynamics 365 Business Central minor version (update): must be the same between Microsoft and STAEDEAN.
41357 is the build number: will differ between Microsoft and STAEDEAN.
# When running this script in a seperate session in ISE we need to import the modules againImport-Module"C:\Program Files\Microsoft Dynamics 365 Business Central\150\Service\Microsoft.Dynamics.Nav.Apps.Management.psd1"Import-Module"C:\Program Files\Microsoft Dynamics 365 Business Central\150\Service\Microsoft.Dynamics.Nav.Management.psd1"# Set the variables before running the script$serverInstance = 'BC150'$version = '15.3.0.0'$name = 'FOOD Application'$appFolders = "C:\SW\FOOD\Base Application\app\To-Increase_FOOD Application_15.3.0.0.app"Publish-NAVApp-Path$appFolders-ServerInstance$serverInstance-SkipVerificationSync-NAVApp-Name$name-ServerInstance$serverInstance-Version$versionInstall-NAVApp-Name$name-ServerInstance$serverInstance-Version$versionInstall Food Manufacturing & Distribution in Docker container
$containerName = "FOODNA20-2"$artifactUrl = Get-BCArtifactUrl-version"20.2.41144.41423"-country us -type Onprem -select Latest
$credential = New-Object pscredential 'admin', (ConvertTo-SecureString-String'Password'-AsPlainText-Force)
$licenseFile = "C:\RSP\Flf Files\BC-V20-Q3-2022-12-03-dev.flf"$companyName = "CRONUS USA - TEST"New-BCContainer-doNotCheckHealth `
-accept_eula `
-updateHosts `
-useBestContainerOS `
-containerName$containerName `
-artifactUrl$artifactUrl `
-auth"UserPassword" `
-Credential$credential `
-accept_outdated `
-assignPremiumPlan `
-includeAL `
-licenseFile$licenseFile `
-Shortcuts DesktopFolder `
-memoryLimit10G
Clean-BcContainerDatabase-containerName$containerName-credential$credentialRestart-BcContainer-containerName$containerNamePublish-BcContainerApp-appFile"C:\RSP\FOODNA.20.2.202209.0\FOODNA.20.2.202209.0\15BASE\APP\To-Increase B.V._FOOD Application_20.2.202209.0.app"-containerName$containerName-credential$credential-install-scope Tenant -sync-useDevEndpointNew-CompanyInBcContainer-companyName$companyName-containerName$containerNameRestart-BcContainer-containerName$containerName