Microsoft supports Side-by-Side development for C/AL and AL. To start using the Side-by-Side development make sure you have the latest version of AdvaniaGIT add-in for Visual Studio Code and update the PowerShell scripts by using the “Advania: Go!” command.
When the Business Central environment is built use the “Advania: Build C/AL Symbol References for AL” to enable the Side-by-Side development for this environment. This function will reconfigure the service and execute the Generate Symbol References command for the environment. From here on everything you change in C/AL on this environment will update the AL Symbol References.
So let’s try this out.
I converted my C/AL project to AL project with the steps described in my previous post. Then selected to open Visual Studio Code in AL folder.
Image may be NSFW.
Clik here to view.
In my new Visual Studio Code window I selected to build an environment – the Docker Container.
Image may be NSFW.
Clik here to view.
When AdvaniaGIT builds a container it will install the AL Extension for Visual Studio Code from that Container. We need to read the output of the environment build. In this example I am asked to restart Visual Studio Code before reinstalling AL Language. Note that if you are not asked to restart Visual Studio Code you don’t need to do that.
Image may be NSFW.
Clik here to view.
After restart I can see that the AL Language extension for Visual Studio Code is missing.
Image may be NSFW.
Clik here to view.
To fix this I execute the “Advania: Build NAV Environment” command again. This time, since the Container is already running only the NAV license and the AL Extension will be updated.
Image may be NSFW.
Clik here to view.
Restart Visual Studio Code again and we are ready to go.
If we build new environment for our AL project we must update the environment settings in .vscodelaunch.json. This we can do with a built in AdvaniaGIT command.
Image may be NSFW.
Clik here to view.
We can verify the environment by executing “Advania: Check NAV Environment”. Everything should be up and running at this time.
Since we will be using Side-by-Side development for C/AL and AL in this environment we need to enable that by executing “Advania: Build C/AL Symbol References for AL”.
Image may be NSFW.
Clik here to view.
This will take a few minutes to execute.
Image may be NSFW.
Clik here to view.
Don’t worry about the warning. AdvaniaGIT takes care of restarting the service. Let’s download AL Symbols and see what happens.
Image may be NSFW.
Clik here to view.
We can see that AL now recognizes the standard symbols but my custom one; “IS Soap Proxy Client Mgt.” is not recognized. I will tell you more about this Codeunit in my next blog post.
Image may be NSFW.
Clik here to view.
I start FinSql to import the Codeunit “IS Soap Proxy Client Mgt.”
Image may be NSFW.
Clik here to view.
Import the FOB file
Image may be NSFW.
Clik here to view.
Close FinSql and execute the “AL: Download Symbols” again. We can now see that AL recognizes my C/AL Codeunit.
Image may be NSFW.
Clik here to view.
Now I am good to go.