Step 4 – Convert C/AL to AL with Visual Studio Code

The ForNAV standard reports are in public preview. We have just released CTP2 and now we want to start testing them with Visual Studio Code. In order to do that we have to convert them to AL objects.

Microsoft is kind enough to provide tooling which you can find on the June update for the developers preview.

The tool is a small .exe file you can find in the same folder as your finsql.exe and called txt2al.exe. It is documented on MSDN.

The tool takes a NAV txt object but it has to be exported using the MS-DOS command prompt using a special option.

Because it is a lot to write down I’ve actually recorded a 30 minutes video and posted it on YouTube. This video shows the commands, shows the differences in beyond compare and tells you how to make the tool run, test and put it on GitHub using a folder structure that makes sense. At least in my opinion.

Here is the video

And here is the text from my Convert.Bat file

finsql.exe Command=ExportToNewSyntax, File="D:\CAL\fornav.txt", Database="Demo Database NAV (10-0)", ServerName=.\NAVDEMO, filter="ID=70000..79999", Logfile=D:\Log_ExportFile.txt


txt2al --source=D:\CAL\ --target=D:\AL\ --rename --extensionStartID 70070000




  1. Dheeraj Dubey says:

    Hi Mark,
    Thanks for this blog.
    when i try to run the bat file in command prompt. only log file has been created with below error:

    [18023703] You do not have permission to run the ‘File, Export, Text’ System.
    Contact your system administrator to have your permissions changed.

    i have already applied developer license and i can manually export the object in txt format.

    Can you please help!


  2. Marshall says:

    when i convert the master table such as “Customer”, it makes AL file like it’s creating the new table meanwhile in my new navcontainer AL, table “Customer” already existed..

    how do i push all the modified code from C/AL “Customer” to AL “Customer” then? i mean it’s a lot of code there.. please help, i’m stuck here


    1. Mark Brummel says:

      Step 1 is to convert your modifications to core NAV tables and pages to delta files. Hope that helps.


      1. Marshall says:

        Hi Mark,
        thanks for replying,, did you mean core NAV tables in AL i presume?
        and could you tell me what delta files mean?
        thanks a lot, really appreciate it man..


      2. Mark Brummel says:

        I think this is where Google search will be a great help. Delta files have been with NAV for a long time. Lots of docs.


      3. Marshall says:

        ahh yes.. will explore about that first..
        thanks a lot mark


Leave a Comment

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.