Print this Post

AL with VSCode: Run Extension Objects (with PowerShell)

Some time ago, Mark blogged an interesting article about running objects from extensions. You can read it here: https://markbrummel.blog/2017/05/20/tip-58-run-extension-objects/ .

It made me wonder .. how would I solve this? And one of the problems of asking myself these kind of questions is .. the answer is always the same :-/:


And apperantly, I already blogged something really similar as well :-):


I created some functions in my module to be able to run objects in a windows client. This enables me to do something like this:
Running a codeunit:

Running a table:

Works like a charm for Extension objects as well :-).

What about the Web Client?

Well .. Duh ;-). Only, the Web Client only supports to be able to run a Page or a Report. So in the latest version of my Powershell-modules, I included a function to support that: Start-NAVApplicationObjectInWebClient.

It’s very the same as the other Start-function – here is an example:


You can see it supports also running the tablet client and the phone client. How easy can it get? 😉

So, I need to have a new project with powershell-stuff to combine with my AL development?

Most certainly not! You can easily combine powershell-scripts with al-development! Just take this screenshot as an example:


This is just a simple example where I included a PowerShell-script in a subfolder of the workspace of an al-project. It keeps being an al-project (mind the “launch.json”, but I’m able to execute Powershell as part of the workspace. Not with F5, but with F8 (execute the selection).

How do i make your modules available on my system

Making my modules available on your machine you can do simply by installing them from the PowerShell Gallery by executing this :

Find-Module | where author -eq waldo | install-module


5.00 avg. rating (96% score) - 1 vote

Permanent link to this article: http://www.waldo.be/2017/06/14/al-with-vscode-run-extension-objects-with-powershell/

2 pings

  1. AL with VSCode: Run Extension Objects (with PowerShell) | Pardaan.com

    […] Bron : Waldo’s Blog Lees meer… […]

  2. Run an object in the new NAV Dev Env with Alt+R | NAV Blog

    […] by Eric Wauters’ (waldo) as always very good blog post about how to run objects in VS Code through PowerShell I added a […]

Leave a Reply

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

%d bloggers like this: