AL-Go/Scenarios/GetStarted.md

3.5 KiB

#1 Create a new per-tenant extension (like AL:Go in VS Code) and start developing in VS Code

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

  1. Navigate to https://github.com/microsoft/AL-Go-PTE and choose Use this template Use this template
  2. Enter app1 as repository name, select Public or Private and select Create Repository from template
  3. Select Actions -> Create a new app -> Run workflow Run workflow
  4. Enter Name, Publisher, ID range and specify Y in Direct Commit and choose Run workflow.
  5. When the workflow is complete, select < > Code in the top bar
  6. Choose the Code button and copy the https Clone Url (in this picture: https://github.com/freddydk/App1.git) Clone
  7. Start VS Code, press Ctrl+Shift+P and select Git Clone, paste the clone URL and select a folder in which you want to clone the directory.
  8. Open the cloned repository and open the workspace when VS Code asks you (or do it manually)
!NOTE

You can rename the al.code-workspace file to <anothername>.code-workspace to be able to better distinguish the workspaces.

  1. In the .AL-Go folder, choose the localDevEnv.ps1 script and Run the PowerShell script. LocalDevEnv
  2. Answer the questions asked about container name, authentication mechanism, credentials and select none for license file. The script might show a dialog asking for permissions to run docker commands, select Yes in this dialog. Wait for completion of the script. LocalDevEnv Done
  3. In VS Code, press Ctrl+Shift+P and clear the credentials cache.
  4. Open the HelloWorld.al file, modify the string and press F5. Depending on authentication selected VS Code might ask for the credentials you provided earlier.
  5. Login to Business Central and your very own world opens up! Very own world
  6. Back in VS Code, you will see that in addition to your changes in HelloWorld.al, the launch.json was also modified with the information about the local environment. Stage your changes, commit and push Launch.json
  7. Back on github.com, investigate your Workflows. Workflows
  8. When the build is done, inspect the Build summary (no test app) Build Summary
  9. Inspect the workflow run by choosing the build job, expanding the Run Pipeline section and the Compiling apps subsection Inspect

back