A question I get a lot – especially from people that come from C/AL, and only take their first steps into AL – is: How do I get to Microsoft’s source code of the BaseApp (and other)?
Well, there are multiple ways, really. You can download symbols, and unpack the symbols. You can download the DVD and get to the code on the DVD, or…
You can simply download the artifacts
And with “the artifacts”, I mean the artifacts that are used to build your Docker images.
If you’re already building your Docker containers based on the artifacts, you probably already have them on your system! If not, you can still make them available, even without having to use Docker! Let’s see how that goes..
You might have heard about the command “Get-BCArtifactUrl” CmdLet that I pullrequested to the BcContainerHelper. What I tried to achieve is some kind of easier way to get to any version of Business Central: by enlisting all possibilities, and by giving a somewhat easier way to filter them. After many improvements from Freddy, now you have a way to easily get to the url of any BC Artifact that Microsoft makes available.
The module also contains a way to download the artifacts with the “Download-Artifacts” CmdLet. So – you can easily get to the url, and you have a cmdlet to download – let’s do that! (if you haven’t got BcContainerHelper, get it first!):
Download-Artifacts -artifactUrl (Get-BCArtifactUrl) -includePlatform
It will download the Artifacts to the folder ” C:\bcartifacts.cache” by default (unless you set up another path). In that folder, you’ll find all AL sources. A few examples:
The AL Base App: C:\bcartifacts.cache\sandbox\*version*\platform\Applications\BaseApp\Source
The Test-Apps: C:\bcartifacts.cache\sandbox\*version*
I always work with the Docker containers, so automatically, I have the sources of the exact versions of BC on my own machine whenever I need it. But if you’re not working with it, or you work with a centralized docker system (so you don’t have anything local) .. now you know an alternative way to get to the sources ;-).