videoAL Developmentofficial - Microsoftreviewed - checked by Opus

What's New in AL: Easy Access to Source Code with Open In VS Code and GitHub Projects (2024)

In Business Central, the extension management page has a new Source Control Details section that shows an extension's GitHub repo and build commit ID, plus a new Open In VS Code action that clones or reopens that repo in VS Code. AL-Go for GitHub fills in this information automatically for extensions it builds. This works even when resource protection policies block downloading the source, but only if you have access to the repo.

  1. 0:00 Introduction and Previous Features
  2. 0:41 Demonstrating the Problem
  3. 1:31 Source Control Details Section
  4. 2:17 Opening Source in VS Code
  5. 3:12 Making and Testing Changes
  6. 3:57 Integration with AL-Go for GitHub
  7. 4:58 Reopening Repositories and Conclusion
video Microsoft Dynamics 365 Business Central (YouTube) · 2024-10-08Watch on YouTube

Overview

The video, published 2024-10-08, shows how a developer can get from an installed extension to its source code. The extension details page has a new Source Control Details section with the GitHub repository and the commit ID tied to the build. A new Open In VS Code action on the extension management page uses that information to open the source in VS Code.

The demo also covers exploring a page from the page inspector in VS Code, making and testing changes, and reopening a repository that was already cloned. AL-Go for GitHub fills in the source control information automatically for extensions it builds. Seeing the repo information does not guarantee access to the repo, and resource protection policies can block the source download.

Key points

  • The extension details on the extension management page have a new Source Control Details section showing the GitHub repository and the commit ID of the build.
  • The new Open In VS Code action on the extension management page opens the extension source in VS Code. You can clone the repo, pick or create a branch, make changes, test with F5 in a sandbox and open a pull request.
  • This gives access to the source even when the app’s resource protection policies do not allow downloading it, so the policies do not need to change.
  • You need access to the GitHub repo. Seeing the repo information does not grant access, and cloning fails with an error if you lack access.
  • AL-Go for GitHub automatically fills in the source control information for extensions built with it. One example is the System Application from the BC apps repo.
  • When the repo was cloned before, VS Code offers a reopen option so it is not cloned again.
  • Exploring fields and pages in VS Code from the page inspector, added in an earlier release, can be used to go to the specific page in the cloned source.

Features

Every feature below: status not stated, demoed.

Feature At
Open In VS Code action on extension management page 2:07
Source Control Details section in extension management 1:31
Automatic population of Source Control Details via AL-Go for GitHub 4:17
Repository reopen functionality in VS Code 4:58

AL objects mentioned

As heard in the captions. A name that matches one object page by exact type and name links to it; the others stay as named.

  • page “extension management page” at 1:11
  • other “page inspector” at 0:26
  • page “Loyalty Rewards demo” at 1:11
  • other “system application” at 4:38

Not found in BC28-30: page “extension management page”, page “Loyalty Rewards demo”.

Quotes

  • 1:31 “I do not have access to the source so the resource protection policies for this app does not allow me to download a copy”
  • 1:31 “I can see the GitHub repo where this comes from and I can see the commit ID that is associated with the build of”
  • 2:07 “with this new action on the extension management page you can now also open the source in vs code”
  • 3:57 “you now have access to the source even though you cannot download it of course only if you have access to this skop repo”
  • 4:17 “for github automatically populates this information in extensions that are built using al go for github so that means that there are”
  • 5:35 “while you now can see the the repo information in the extension management page you may or may not have access to that repo”

Disclaimers in the video

  • 4:17 other: Al go for GitHub automatically populates this information in extensions that are built using Al go for GitHub

Presenters (as heard): Stephan Bow.