Exercise - Create and run an AL extension

Completed

You are a developer for Cronus International Ltd. and learning how to create objects in the Visual Studio Code development environment. First, you create a new AL extension and then publish the extension to your test environment. When you have completed your tasks, you should see a Hello World message.

Complete the following tasks

  • Install the AL Language extension.

  • Create a new AL extension project.

  • Deploy the AL extension to the cloud sandbox.

Steps

  1. Start Visual Studio Code.

  2. Select View and then Extensions (Ctrl+Shift+X).

  3. Enter AL Language in the Search Extensions in the Marketplace search box.

  4. Select the green Install button.

  5. Create a new AL extension project. Select View and then Command Palette... (Ctrl+Shift+P).

  6. Enter AL: Go! in the search box and then select the command from the list.

  7. Accept the suggested path (or enter another path).

  8. Select the 6.0 Business Central 2020 release wave 2 target platform.

  9. Select Microsoft cloud sandbox as the development endpoint.

  10. Download the application symbols. Select View and then Command Palette... (Ctrl+Shift+P).

  11. Enter AL: Download symbols in the search box and then select the command from the list.

  12. If requested, provide your organizational credentials (Microsoft 365 account/Microsoft Entra ID account).

  13. Verify that you see a folder called .alpackages with three .app files.

  14. Verify that the HelloWorld.al file doesn't show up in red.

  15. Open the HelloWorld.al file and verify that Customer List isn't underlined in red.

  16. Open the app.json file and change the name setting to Hello World. Change the publisher setting to Cronus International Ltd.

  17. Open the launch.json file in the .vscode folder and verify that the startupObjectId setting is set to 22 and the startupObjectType is set to Page.

  18. Publish your extension to the sandbox. Select View and then Command Palette... (Ctrl+Shift+P).

  19. Enter AL: Publish (F5) in the search box and select the command from the list.

  20. Verify that the Dynamics 365 Business Central application launches and that the Hello World message box appears.