AL-Go-PTE

Neil HaddleyAugust 26, 2023

Extensions

You can change Business Central by installing apps that add functionality, change behaviour, or give you access to 3rd party online services.

AL-Go for GitHub is a set of GitHub templates and actions, which can be used to setup and maintain DevOps processes for your Business Central AL projects

I used AL-Go for GitHub to create a Business Central per-tenant extension (PTE) with VS Code.

(Notice that you can upload a Per Tenant Extension (PTE) to Microsoft Dynamics Business Central using the Business Central Extension Management page.)

I used the AL-Go-PTE GitHub template repository https://github.com/microsoft/AL-Go-PTE

Prerequisites: A GitHub account, A Windows machine, VS-Code (with AL and PowerShell extensions installed), and Docker installed locally.

Create a new repository using the AL-Go-PTE GitHub template repository

Create a new repository using the AL-Go-PTE GitHub template repository

haddley-al-go-pte

haddley-al-go-pte

Windows laptop

I installed Docker Desktop, Windows Subsystem for Linux, Git, GitHub Desktop, and Visual Studio Code on a Windows 10 laptop.

Docker Desktop

Docker Desktop

Windows Subsystem for Linux

Windows Subsystem for Linux

Git

Git

GitHub Desktop

GitHub Desktop

Visual Studio Code

Visual Studio Code

I used GitHub Desktop to clone the haddley-al-go-pte repository

I used GitHub Desktop to clone the haddley-al-go-pte repository

I switched Docker to support Windows container (rather than Linux containers)

I switched Docker to support Windows container (rather than Linux containers)

Enable-WindowsOptionalFeature -Online -FeatureName containers –All

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V –All

https://stackoverflow.com/questions/57431890/error-response-from-daemon-hcsshimcreatecomputesystem-the-virtual-machine-co

I navigated to the .AL-Go folder and ran the localDevEnv.ps1 PowerShell script

I navigated to the .AL-Go folder and ran the localDevEnv.ps1 PowerShell script

I entered a username:admin and password:<password>

I entered a username:admin and password:<password>

Downloading the business central docker image

Downloading the business central docker image

Creating the docker image

Creating the docker image

Docker desktop displays the Business Central image

Docker desktop displays the Business Central image

Docker desktop displays the Business Central container

Docker desktop displays the Business Central container

The container is configured

The container is configured

Laptop folders are available inside the container

Laptop folders are available inside the container

I needed to navigate to http://bcserver/BC/tenant=default

I needed to navigate to http://bcserver/BC/tenant=default

I re-entered my username:admin and password:<password> (see above)

I re-entered my username:admin and password:<password> (see above)

Business Central running in the local Docker container

Business Central running in the local Docker container

Publishing the hello world extension (the settings are copied to launch.json)

Publishing the hello world extension (the settings are copied to launch.json)

The sample extension has been deployed. Navigating to the customers page triggers the message

The sample extension has been deployed. Navigating to the customers page triggers the message

Installing AL Language Extention

Installing AL Language Extention

I updated the trigger's MessageI ran AL: Download Symbols (entering my username:admin and password:<password>); and I clicked the Run | Start Debugging menu item

I updated the trigger's MessageI ran AL: Download Symbols (entering my username:admin and password:<password>); and I clicked the Run | Start Debugging menu item