Github with AL Starts | S-Metric, Inc.
General Technology

Github with AL Starts

When Github marries with AL (Dynamics 365 BC) in Hello World !!!

When we, microsoft dynamics 365 Business Central (BC) consultants start with HelloWorld in Github, we can start with GitHub – microsoft/AL-Go-PTE which creates the template for us.

We can start to use that template to create by pressing that button

That will create the template we want it

Then you get something like this, HelloWorld GIT

You will notice that something is still missing, like most of us try to create the app at least.

If you go to Actions tab, you will notice that initial commit is still running on it. (It takes a while, few min.. maybe because it’s free version :*(

Once you finish that initial Commit, I was looking at left side of actions.. a lot of choices are here, but I wil try to stay with create app.

You want to wait until that PostProcess has green light on it, otherwise, create app wont’ works.

Okay I’m creating new app, and it shows all the fun option that you should put in.. you know what to put if you are a AL developer (or c/al developer like me.. LOL)

You can try to put “Direct Commit” if you don’t want your change to sitting on stage.

Use for GhTokenworkflow for PR/Commit might requires advanced Git skill, we can research and cover this later. This is something you can go over

I have pressed the button, it goes rock and roll you just need to chill until yellow button becomes a green light.

Once you are done, let’s copy the url and open up visual studio code

Once you open up, We gotta do Clone the Git. In Git world, Clone is first fresh copy of Git

Then I get those mysterious questions.

so clicked on it, and it just show the work on the left side

We gotta fix the launch.json first so we can download symbols.

I did magic with CTRL + Space then I choose Cloud Sandbox

Get your Tenants and Environment if that’s your environment, tenants are long number, and name is “Demo”

Then AL : Generate Manifest then we are ready to get symbol

Then you get bunch of error.. Ha Ha

Here is the challenges I see it, I see those HelloWorld_GIT folder created within workspace. I probably don’t want that, since when i try to download symbol, it goes to parent folder.

so I just move whatever is inside of HelloWorld_GIT App folder to take it out and deleted subfolder.

It makes sense that it will work from parent folders, but doesn’t make sense much from template why it doesn’t give you an option to put that in parent’s folders. I understand they want to create many apps and other test units, but at least give which one to be in parents.. in my opinion.. anyways.. i did that, and now you can download symbol

Then I did publish without debugging, and WORKS!

Okay, since it’s not just hello world, let’s do some Git work. We can start to push our changes back to Github by going Source Control and Commit

Then you will see that in Github with all commit;

If other users changed on your source while you are working on, you need to call Fetch to review with your source code, or you can call PULL to overwrite your source code.

We will go more detail in GIT in next articles.