CRS Al Language Extension – Running Objects

As said in one of my previous posts, I was going to do some “deeper” description of the functionality of the tool that I’m working on to make your “AL”-life in VSCODE a little bit easier: the “CRS AL Language Extension“.

Today: the “Running Objects” functionality

This was the first major feature that I tried to add. Namely, being able to run an object without having to change and save the launch.json. The easiest way to find the functionality is in the Command Palette. Just search for “>crs:run”, and it will give you all options:

Run Object in Web/Phone/Tablet Client

These options will run an object, using the web client either in web, phone or tablet mode .. without having to update the launch.json all the time.. . The functionality is going to look at your launch.json-file to figure out where you are deploying – and it will use those settings to run an object. So you actually don’t have to do anything to make it work – just have a valid server set up in your launch.json.

However, I was notified that it doesn’t work in all cases – so I also built an option for you to use a “PublicWebBaseUrl“. So, if necessary, just set that up in your settings (makes sense to use a workspace-setting for that). Use the same value as what would be in your serverinstancesettings .. and you should be good to go!

Run Current Object (Web Client)

This is (in my opinion) the coolest one – at least one that I use a lot, also because there is a shortcut that I created for that: CTRL+SHIFT+R (CTRL+R was already taken…). Just when you have an active file open, it will figure out what object that is (I have a NAVObject class that can do that…) – or what object your are extending – and run that object in the web client.

Run CAL Test Tool in Web Client

This is also a variation on the above – it’s basically just running a fixed page.. . But very useful when you are building test-codeunits. Since I’m trying to implement Test-Driven-Development, usually you run the testsuite a lot while implementing your business logic. So personally I’m running this quite a lot ;-).

Run Object In Windows Client

You might have noticed – there is also a command to run an object in the windows client. The nice thing about the windows client is that it can run any type of object – while in the web client, you can only run a table, report or page. The downside is that it doesn’t really work very well with Docker, since it assumes you have a windows installation, and will use the “DynamicsNAV:///”-URL to start the specific object. Let’s say it’s work in progress to have this decently running on docker ;-).

But IF you have all in place, you just need to make sure to set up the connection to it as well with these settings:

  • `CRS.WinServer`: Server where the windows client is connecting to
  • `CRS.WinServerInstance`: Serverinstance where the windows client is connecting to
  • `CRS.WinServerInstancePort`:Portnumber of the serverinstance where the windows client is connecting to


Feedback is always appreciated! If you can make this work on a Docker image – plase share ;-). If you have other pages that might be interesting to add as a separate command – share! Any other feedback – share! :-). The best place to share feedback, bugs, .. anything, is the issues-page on my github for this project, which is here:


5.00 avg. rating (98% score) - 2 votes

Permanent link to this article:

Leave a Reply

Your email address will not be published.

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