Converting Dynamics NAV source code from C/AL to AL using Command Prompt

Hi Everyone,

In this article, I will show you how you can convert NAV or Business central cside C/AL code to AL using command prompt.

Following steps will help you to converting cside object to AL:
Step 1: Create 2 different folder and a .bat file in any drive like shown in following image:

Script or code snippet in convert.bat file

finsql.exe Command=ExportToNewSyntax, File="E:\TXT2AL\Tab\fornav.txt", Database="Demo Database NAV (13-0)", ServerName=.\MATH\NAVDEMO, Filter=Type=table;ID=50100 Logfile=E:\TXT2AL\Log_ExportFile.txt
pause
txt2al --source=E:\TXT2AL\Tab\ --target=E:\TXT2AL\AL\ --rename --extensionStartID 70070000
pause

Step 2: Export NAV or Business Central Object in Tab Folder

Step 3: Open Command prompt as a Administrator 



Write following cd command to navigate to the RoleTailored Client folder so we can use finsql.exe that we wrote in the convert.bat file:
CD "C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\130\RoleTailored Client\"
To execute the convert.bat file write following command:
E:\TXT2AL\convert.bat

During this execution process you command prompt look like below screenshot and the converted AL file will be available in E:\TXT2AL\AL folder.

Go to E:\TXT2AL\AL folder and you will find the AL objects as shown in below screenshot:

I hope this article will help you when you will try to convert Dynamics NAV C-Side object source code to AL.

Stay Tuned!

Comments (1) -

963553 900932Its  great  as your other  blog posts : D, thanks  for posting . 915918

Add comment