Skip to main content

Import Symbols in New or Upgrade Databases with Microsoft Dynamics NAV 2018

Import Symbols in New or Upgrade Databases with Microsoft Dynamics NAV 2018

What does upgrading databases have in common with creating new databases in Microsoft Dynamics NAV 2018? They do not contain symbols. More precisely, when upgrading a database from an older version to Dynamics NAV 2018, or creating a new database for the same version, it does not have any symbols automatically created or imported.
If you intend to develop your extension with Visual Studio Code, it is mandatory that you accomplish this task and set a couple of new rules when upgrading or creating new databases:

#1 Which Symbols do I need?

You can determine this easily by deploying a Cronus database from Microsoft Dynamics NAV 2018, run an elevated PowerShell ISE, and type the following:
Import-Module 'C:\Program Files\Microsoft Dynamics NAV\110\Service\NavAdminTool.ps1'
Get-NAVAppInfo -ServerInstance DynamicsNAV110 -SymbolsOnly

This will result in the resume of Symbols App needed for Modern Development. See below the result:
Id : e917aee5-0860-45c4-98e3-354769cabecf
Name : Application
Version : 11.0.19846.0
Publisher : Microsoft
ExtensionType : ModernDev
Id : d4a14f4a-0ae8-4501-a527-b3e36c0c3d67
Name : Test
Version : 11.0.19846.0
Publisher : Microsoft
ExtensionType : ModernDev
Id : 8874ed3a-0643-4247-9ced-7a7002f7135d
Name : System
Version : 11.0.12925.0
Publisher : Microsoft
ExtensionType : ModernDev
There are three standard symbol apps that are needed to make the database suitable for Extension V.2 development On-Premise:
- APPLICATION
Contains symbols for all the application objects described in the object designer, except system tables spanning from 2000000004 to 2000000199 and standard Test Toolkit objects.
This is only needed if you deploy a standard Cronus database and it is intended to be a starting point for developers. Usually, developers should opt for generating symbols through C/SIDE as described in our earlier blog post: Generate Symbols in a Modern Development environment with Microsoft Dynamics NAV 2018
-SYSTEM
Contains symbols for system tables spanning from 2000000004 to 2000000199.
System table symbols are not regenerated. For this reason, in a Modern Development environment, they should not be considered for any changes within C/SIDE.
-TEST
Contains symbols for Application Test Toolkit objects.
Standard Application Test Toolkit object symbols are not regenerated. For this reason, in a Modern Development environment, they should not be considered for any changes within C/SIDE.

#2 Where and how do I get these Symbols?

There are several ways to obtain the appropriate symbols for upgraded or new databases. The official upgrade documentation references where you can find the symbols file. Just check “Task 19: Publish and install/upgrade extensions” in Upgrading the Data to Microsoft Dynamics NAV 2018 on Docs.
Usually, Symbol apps could/should be downloaded from the ModernDev folder in the product DVD and published in the database through PowerShell with the following syntax:
Import-Module 'C:\Program Files\Microsoft Dynamics NAV\110\Service\NavAdminTool.ps1'
Publish-NAVApp -ServerInstance DynamicsNAV110 -PackageType SymbolsOnly -Path C:\Temp\Microsoft_System_11.0.12925.0.app -SkipVerification
Publish-NAVApp -ServerInstance DynamicsNAV110 -PackageType SymbolsOnly -Path C:\Temp\Microsoft_Test_11.0.19846.0.app -SkipVerification

NOTE:
Symbols app files must be taken from the DVD that your installation is targeting to match fully the System and Test application definition. Therefore, version number (e.g., 11.0.12925 or 11.0.19846) could be different from the one shown in the example above.
Application Symbol app file is not included in the installation DVD since most likely the On-Premise application is customized and the equivalent symbols need to be generated through finsql.exe.
NOTE:
When working side by side with C/SIDE Development Environment and Visual Studio Code, it is recommended to start finsql.exe with generatesymbolreference flag active as described in the earlier blog post: Generate Symbols in a Modern Development environment with Microsoft Dynamics NAV 2018
With the flag active at runtime, any compilation would generate, update or delete the symbol references. In Visual Studio Code, you could easily get these changes when downloading symbols. Moreover, there are two other advantages:
  • When compiling few objects, the compilation overhead that generates symbols might be negligible and not even perceived.
  •  NAV Server has cached in place to recognize what has changed and optimized for faster symbol adjustments.
There is an alternative way, a Modern Developer trick, to gather standard Symbol app files easily: extract them from a standard Cronus database. By creating a simple "HelloWorld" sample through AL: Go!, it is possible to download Application and System app symbol files automatically from a CRONUS database. This is the default behavior. But what about the Test Symbol app file? To have this extracted too, the trick is to add it as a dependency in the App.json file in the following way:
"dependencies": [
{
"appId": "d4a14f4a-0ae8-4501-a527-b3e36c0c3d67",
"name": "Test",
"publisher": "Microsoft",
"version": "11.0.19846.0"
}
]

where appId, name, publisher and version can be determined dynamically using Get-NAVAppInfo PowerShell cmdlet. In the end, the "HelloWorld" sample could be simply discarded, and the developer only retains distilled Symbol app files contained in the .alpackages folder for a future usage/import in upgraded or new databases.

These postings are provided "AS IS" with no warranties and confer no rights. You assume the entire risk when you use it.

Duilio Tacconi (dtacconi)
Microsoft Dynamics Italy
Microsoft Customer Service and Support (CSS) EMEA
Thanks to Stanislaw Stempin and Kalman Beres (Modern Dev team MDCC Lyngby)

Comments

Popular posts from this blog

Quick Fix Visual Studio displaying NAV Report Layout as XML

I got this issue with Visual Studio 2015 Enterprise Edition.  Every time I open a Dynamics NAV report layout in Visual Studio, RDLC is rendered as XML file instead of visual layout with all the fields and tool boxes.  How the report layout looks:  FIX : In order to fix the issue you need to install  "Microsoft SQL Server Data Tools" .  To install "Microsoft SQL Server Data Tools" you need to go to  Control Panel   ->  Programs and Features  - >  Microsoft Visual Studio <Edition>  -> Change Or you can re run the installation setup.  From the features list, enable "Microsoft SQL Server Data Tools" option and proceed.  Once the installation is completed you are good to go. This time report layout will open in correct design layout.  Hope this helps you to resolve the issue. happy designing.  Please provide your feedback with a comment.  Thank you and Regards, +256775120005 Kairo Okello Dan ERP Solutions Consultant

The Difference Between Microsoft Dynamics NAV and AX

The Difference Between Microsoft Dynamics NAV and AX Microsoft Dynamics offers a variety of ERP solutions. You might say there is a solution for every purpose and every industry. Two of the offerings,  Dynamics NAV  and  Dynamics AX (now part of  Dynamics 365 ) share some of the same features so you might wonder: ‘what are the differences and which is right for my organization?’ Both ERP solutions are highly customizable, available in and adaptable to many languages and currencies used around the world. The two solutions can also be employed in a central location or across diverse satellite locations and are designed to grow as a business grows. Their industry-specific functionality can assure compliance with local and regional requirements. In short, both solutions could rightly be described as comprehensive and well equipped to manage complex requirements of supply chain and inventory. So, what is the difference? Is one better than the other for your particular organiz

How to install a Microsoft Dynamics NAV cumulative update

How to install a Microsoft Dynamics NAV 2018 cumulative update Introduction This article describes how to install a cumulative update for Microsoft Dynamics NAV 2018. You have to recompile all objects after you install a cumulative update. A cumulative update is a cumulative set of files that includes all hotfixes and regulatory features that have been released for Microsoft Dynamics NAV 2018. A cumulative update includes files that are separated into the following folders: APPLICATION DVD See  Upgrading the Data to Microsoft Dynamics NAV 2018  for details. How to install the cumulative update files APPLICATION The APPLICATION folder includes the following files: AccumulatedChangeLog.<Locale>.<Build No.>.txt Changelog.<Locale>.<Build No.>.txt CUObjects.<Locale>.<Build No.>.fob Objects.<Locale>.Objects.<Locale>.<Build No.>.txt To install the application files, follow these