Documentation Index

Fetch the complete documentation index at: https://docs.staedean.com/llms.txt

Use this file to discover all available pages before exploring further.

Install and initialize Industrial Equipment Manufacturing

Prev Next

When deployed on-premises, create a new database, build it up with the Microsoft System Application, and complete it with the Industrial Equipment Manufacturing.

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 (make sure to select the correct version of the program files folder): Import-Module "C:\Program Files\Microsoft Dynamics 365 Business Central\200\Service\Microsoft.Dynamics.Nav.Apps.Management.psd1"   Import-Module "C:\Program Files\Microsoft Dynamics 365 Business Central\200\Service\Microsoft.Dynamics.Nav.Management.psd1"    # Define the variables for the script (current values are provided as examples):   $serverInstance = 'BC200'   $databaseName = "ToIncrease"   $databaseServer = "localhost"   $applicationVersion = '20.1.39764.39901'   $applicationFamily = 'W1'   $systemApp = "C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\200\AL Development Environment\System.app"   $systemApplication = "C:\ ... \Applications\System Application\Source\Microsoft_System Application.app"   $companyName = 'IEM'    # Create a new database:   New-NAVApplicationDatabase -DatabaseName $databaseName  -DatabaseServer $databaseServer   Set-NAVServerConfiguration -KeyName DatabaseName -KeyValue $databaseName -ServerInstance $serverInstance   Restart-NAVServerInstance -ServerInstance $serverInstance    # Connect the new database to the Business Central service:   Set-NAVApplication -ApplicationVersion $applicationVersion -ServerInstance $serverInstance -Force   Set-NAVApplication -ApplicationFamily $applicationFamily -ServerInstance $serverInstance -Force   Sync-NAVTenant -ServerInstance $serverInstance -Mode Sync    # Publish the Microsoft system application in the database:   Publish-NAVApp -Path $systemApp -ServerInstance $serverInstance -PackageType SymbolsOnly   Publish-NAVApp -Path $systemApplication -ServerInstance $serverInstance   Sync-NAVApp -Name "System Application" -ServerInstance $serverInstance    # Install the Microsoft system application in the database and create a new Company:   Install-NAVApp -Path $systemApplication -ServerInstance $serverInstance   New-NAVCompany -CompanyName $companyName -ServerInstance $serverInstance -CompanyDisplayName $companyName  

InstallIEMapps.ps1

To prepare for this script, download the STAEDEAN Industrial Equipment Manufacturing Artifacts and unzip the downloaded folder on your desktop. Update your local path in the script (\ ... ).

Note

  • Upon successful completion of the CreateDatabase.ps1 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.2.38860.0.

  • 15 is the Microsoft Dynamics 365 Business Central major version: must be the same between Microsoft and STAEDEAN.

  • 2 is the Microsoft Dynamics 365 Business Central minor version (update): must be the same between Microsoft and STAEDEAN.

  • 38860 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 again
Import-Module "C:\Program Files\Microsoft Dynamics 365 Business Central\200\Service\Microsoft.Dynamics.Nav.Apps.Management.psd1"
Import-Module "C:\Program Files\Microsoft Dynamics 365 Business Central\200\Service\Microsoft.Dynamics.Nav.Management.psd1"
    
#apps in correct order up and until 

D365 BC 20 $apps = "_Exclude_TI-Common,IEM Application,Application,_Exclude_TI-Lifecycle Base,IEM Lifecycle,IEM Extended Application,IEM Advanced Application" #apps in correct order from D365 BC 20.1 $apps = "IEM Application,Application,TI-Common,IEM Extended Application,IEM Advanced Application,TI-Lifecycle Base,IEM Lifecycle" #When not upgrading all apps you can modify this list accordingly.  $serverInstance = 'BC200'  #Make sure to download and unzip the artifacts folder to the location where you are installing from. $buildArtifactFolder = "C:\...\Artefacts\20.1.73246.0" $appsSplit = $apps.Split(',') $i = $appsSplit.Count  #Skip this section on an initial installation, only required when upgrading from a previous BCxx build. Do{     $i--   Write-Host "Uninstall & Unpublish $($appsSplit[$i])"    $installedAppVersion = Get-NAVAppInfo -ServerInstance $serverInstance|Where-Object { $_.Name -eq $appsSplit[$i] }|%{"$($_.Version.Major).$($_.Version.Minor).$($_.Version.Build).$($_.Version.Revision)"}   Uninstall-NAVApp -Name $appsSplit[$i] -ServerInstance $serverInstance -Version $installedAppVersion   Unpublish-NAVApp -Name $appsSplit[$i] -ServerInstance $serverInstance -Version $installedAppVersion  } Until($i -eq 0)   #Publish and Install apps $apps.Split(',') | ForEach-Object {     $appName = $_     $AllAppFiles = Get-ChildItem -Path $buildArtifactFolder -Filter "*.app" -Recurse     foreach ($AllAppFile in $AllAppFiles) {if ((Get-NAVAppInfo -Path $AllAppFile.FullName |Select-Object -expand Name) -eq $appName){$appFileName = $AllAppFile.FullName} }     Write-Host "Install $_ ($appFileName)"     $newAppVersion = Get-NAVAppInfo -Path $appFileName|%{"$($_.Version.Major).$($_.Version.Minor).$($_.Version.Build).$($_.Version.Revision)"}      Publish-NAVApp -Path $appFileName -ServerInstance $serverInstance     Sync-NAVApp -Name $appName -ServerInstance $serverInstance -Version $newAppVersion     #Comment-out the next line on an initial installation, only required when upgrading from a previous BCxx build.     Start-NAVAppDataUpgrade -Name $appName -ServerInstance $serverInstance -Version $newAppVersion     Install-NAVApp -Name $appName -ServerInstance $serverInstance -Version $newAppVersion }