Skip to main content

Generate Symbols in a Modern Development environment with Microsoft Dynamics NAV 2018

Generate Symbols in a Modern Development environment with Microsoft Dynamics NAV 2018

With the general availability of Microsoft Dynamics NAV 2018 in the first week of December 2017, the new and Modern development environment experience becomes more and more used by developers; side by side with the C/SIDE development environment.
Working with a standard CRONUS database is pretty easy, while every developer would like to give it a spin with their own customized database. In this scenario, it is paramount to have the appropriate symbols generated in order to be successfully pulled out by AL Extension command in Visual Studio Code and develop a custom extension against a proper customized source database.
Installing CSIDE Development Environment side by side with Modern Development Environment is duly described in the docs, as well as how to generate / re-generate symbols. For more information, see https://docs.microsoft.com/en-us/dynamics-nav/developer/devenv-running-cside-and-al-side-by-side.
Here are a few tips that can be helpful when generating symbols.

1. The finsql.exe command must be executed client side.

Run a command prompt and change directory to the client folder (typically C:\Program Files (x86)\Microsoft Dynamics NAV\110\RoleTailored Client).
From the client directory run the following command
finsql.exe Command=generatesymbolreference, Database="Demo Database NAV (11-0)", ServerName=ITMBSNAV

where Database is the database where you wish to generate symbols and ServerName is the SQL Server instance where the Database is attached
NOTE: The command itself might give the idea to be completed in few milliseconds but this is not true since finsql.exe continue to run in background even if the prompt returns to the command console window.

2. Use Task Manager to inspect the resource consumption by finsql.exe process.

When running finsql.exe with the generatesymbolreference parameter key within command prompt, it might seem the process ending too fast or that nothing happened.
Just close the command prompt and run Task Manager (taskmgr.exe) and go to tab Details to inspect finsql.exe background process and its resource consumption.
You might notice memory growing up high of several hundreds of MB and process disappear when finished.


3. Check for navcommandresult.txt file in the client folder.

When the process ends, a file is always generated in the RTC client directory named navcommandresult.txt. If all goes ok you might find something like the following
[0] [06/12/17 14:36:17] The command completed successfully in '177' seconds.
If the finsql.exe command fails or generates error for whatever reason, you might find an additional file called naverrorlog.txt with the error log description.
That’s it. When symbols are generated correctly, these are ready to be fetched by AL Extension from Visual Studio Code.
Further simple tips that might apply when working with the Modern Development Environment

4. Make sure you use the right AL Extension.

The Dynamics NAV 2018  installer (setup.exe) includes an option to install the Modern Development Environment. If you choose that option, you will find a Modern Development Environment directory together with the client folder. Inside there is the appropriate VSIX file to work with that specific Dynamics NAV version.
Make sure you use that one with Microsoft Dynamics NAV 2018. To import the VSIX file, simply run Visual Studio Code and choose the Extension tab (CTRL+SHIFT+X) then click on “More” (the three dots, top right) and select “Install from VSIX…” option.
NOTE: It is very important to have the VSIX from the same platform version as your Dynamics NAV installation, otherwise you cannot publish (F5) your extension. Be really sure, then, to have the same VSIX targeting your Dynamics NAV 2018 installation files (e.g. VSIX RTM targeting RTM installation, VSIX CU 1 targeting CU 1 installation and so on).

5. Populate Web Client Base URL in the Client Service tab in the NAV Administration Console.


This is needed when you publish your APP with or without debugging or an error like the following might be thrown in Visual Studio Code
[2017-12-07 22:32:23.32] Error: Could not open the specified startup page. Please check that the server configuration key PublicWebBaseUrl has been properly set

6. Disable CAS Policy to enable Visual Studio Code AL Debugger

It is mandatory to disable CAS policy server side when publishing the APP from Visual Studio Code with AL Debugger enabled (F5). If this is not enabled, you will receive an error when NAV Web Client is about to be loaded.

To disable CAS policy, locate Microsoft.Dynamics.NAV.Server.exe.config file in the server directory and change the relevant entry in the following way:
<netfx40_legacysecuritypolicy enabled="false"/>
Restart the Dynamics NAV Server service to make the modification effective.

These postings are provided "AS IS" with no warranties and confer no rights. You assume all risk for your use.
Duilio Tacconi (dtacconi)
Microsoft Dynamics Italy
Microsoft Customer Service and Support (CSS) EMEA

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