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
 [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.
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