|
1 | 1 | # Create a new per-tenant extension (like AL:Go in VS Code) and start developing in VS Code
|
2 | 2 |
|
3 |
| -*Prerequisites: A GitHub account, VS-Code (with AL and PowerShell extensions installed), and Docker installed locally* |
4 |
| - |
5 |
| -1. Navigate to [https://github.com/microsoft/AL-Go-PTE](https://github.com/microsoft/AL-Go-PTE) and choose **Use this template** |
6 |
| -  |
7 |
| -1. Enter **app1** as repository name, select Public or Private and select **Create Repository from template** |
8 |
| -1. Select **Actions** -> **Create a new app** -> **Run workflow** |
9 |
| -  |
10 |
| -1. Enter **Name**, **Publisher**, **ID range** and specify **Y** in **Direct Commit** and choose **Run workflow**. |
11 |
| -1. When the workflow is complete, select **< > Code** in the top bar |
12 |
| -1. Choose the **Code** button and copy the **https Clone Url** (in this picture: *https://github.com/freddydk/App1.git*) |
13 |
| -  |
| 3 | +*Prerequisites: A GitHub account, VS Code (with AL, git and PowerShell extensions installed), and Docker installed locally* |
| 4 | + |
| 5 | +1. Navigate to [https://github.com/microsoft/AL-Go-PTE](https://github.com/microsoft/AL-Go-PTE), choose **Use this template** and select **Create a new repository**. |
| 6 | + |
| 7 | +  |
| 8 | + |
| 9 | +1. Enter **app1** as repository name, select Public or Private and select **Create Repository** |
| 10 | + |
| 11 | +  |
| 12 | + |
| 13 | +1. In your new repository, select **Actions** -> **Show more workflows...**, **Create a new app** -> **Run workflow** |
| 14 | + |
| 15 | +1. Enter **Name**, **Publisher**, **ID range**, select **Direct Commit** and choose **Run workflow**. |
| 16 | + |
| 17 | +  |
| 18 | + |
| 19 | +1. Wait for the workflow to complete |
| 20 | + |
| 21 | +  |
| 22 | + |
| 23 | +1. When the workflow is complete, select **< > Code** in the top bar and see that your repository now contains a folder called **app1** |
| 24 | + |
| 25 | +  |
| 26 | + |
| 27 | +1. Choose the **Code** button and copy the **https Clone Url** (in this picture: *https://github.com/freddyk-temp/app1.git*) |
| 28 | + |
| 29 | +  |
| 30 | + |
14 | 31 | 1. 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.
|
| 32 | + |
| 33 | +  |
| 34 | + |
15 | 35 | 1. **Open the cloned repository** and **open the workspace** when VS Code asks you (or do it manually)
|
16 | 36 |
|
17 | 37 | > [!NOTE]
|
18 | 38 | > You can rename the `al.code-workspace` file to `<anothername>.code-workspace` to be able to better distinguish the workspaces.
|
19 | 39 |
|
20 |
| -1. In the **.AL-Go** folder, choose the **localDevEnv.ps1** script and Run the PowerShell script. |
21 |
| -  |
22 |
| -1. 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. |
23 |
| -  |
24 |
| -1. In VS Code, press **Ctrl+Shift+P** and **clear the credentials cache**. |
25 |
| -1. 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. |
26 |
| -1. Login to **Business Central** and your **very own world** opens up! |
27 |
| -  |
28 |
| -1. 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** |
29 |
| -  |
30 |
| -1. Back on github.com, investigate your **Workflows**. |
31 |
| -  |
32 |
| -1. When the build is done, inspect the **Build summary** (no test app) |
33 |
| -  |
34 |
| -1. Inspect the workflow run by choosing the **build job**, expanding the **Run Pipeline** section and the **Compiling apps** subsection |
35 |
| -  |
| 40 | +10. In the **.AL-Go** folder, choose the **localDevEnv.ps1** script and Run the PowerShell script. |
| 41 | + |
| 42 | +  |
| 43 | + |
| 44 | +01. 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. |
| 45 | + |
| 46 | +  |
| 47 | + |
| 48 | +01. In VS Code, press **Ctrl+Shift+P** and **clear the credentials cache**. |
| 49 | + |
| 50 | +01. 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. |
| 51 | + |
| 52 | +  |
| 53 | + |
| 54 | +01. Login to **Business Central**, navigate to Customers and your **very own Hello World** opens up! |
| 55 | + |
| 56 | +  |
| 57 | + |
| 58 | +01. 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 **sync** your changes. |
| 59 | + |
| 60 | +  |
| 61 | + |
| 62 | +01. Back on github.com, click **Actions** and investigate your workflows. |
| 63 | + |
| 64 | +  |
| 65 | + |
| 66 | +01. When the build is done, click the build and inspect the **Build summary** |
| 67 | + |
| 68 | +  |
| 69 | + |
| 70 | +01. Inspect the workflow run by choosing the **build job**, expanding the **Run Pipeline** section and the **Compiling apps** subsection |
| 71 | + |
| 72 | +  |
36 | 73 |
|
37 | 74 | ______________________________________________________________________
|
38 | 75 |
|
|
0 commit comments