1. Introduction
This document provides a step-by-step guide for creating and setting up an AL (Application Language) project using the Microsoft AL: Go PTE template on GitHub. The project is designed to extend Microsoft Dynamics 365 Business Central using AL, the modern development language for Business Central extensions. This documentation walks you through the process of creating a new repository, configuring the project, and starting development.
2. Step-by-Step Guide
Step 1: Go to GitHub and Find the Microsoft AL: Go PTE Template
- Open your browser and go to GitHub.
- Search for the Microsoft AL: Go PTE template in the GitHub search bar
- Select the template repository. This template provides a pre-configured AL project structure, making it easier to start developing extensions for Business Central.
Step 2: Create a New Repository
- On the Microsoft AL: Go PTE template page, click the Use this template button.
- Choose Create a new repository.
- Fill in the repository name, description, and visibility (public or private).
- Click Create repository. This will create a new repository in your GitHub account with the template’s structure and files.
Step 3: Go to Actions and Create a New BC App
- Navigate to the Actions tab in your newly created repository.
- Click on the workflow named Create New BC App.
- Click the Run workflow button to trigger the workflow.
- This workflow will generate a new Business Central app with the necessary files and configurations.
- Once the app file is created, Click on “Code” button and copy the HTTPS URI.
Step 4: Copy the HTTP URI
- After the workflow completes, go to the Code tab in your repository.
- Click the Code button and copy the HTTP URI of your repository. This URI will be used to clone the repository to your local machine.
Step 5: Go to VS Code and Search for Git:Clone
- Open Visual Studio Code (VS Code) on your local machine.
- Press Ctrl+Shift+P (or Cmd+Shift+P on macOS) to open the command palette.
- Search for Git:Clone and select it.
- Paste the HTTP URI you copied in Step 4 into the input box and press Enter.
- Choose a local directory where you want to clone the repository.
Step 6: Add Configuration to launch.json and app.json
- Open the cloned repository in VS Code.
- Navigate to the .vscode folder and open the launch.json file.
- Update the server, serverInstance, and authentication settings to match your Business Central sandbox environment.
- Open the app.json file in the root directory.
- Update the name, publisher, version, and idRanges fields to reflect your app’s details.
Step 7: Download the Symbols
- In VS Code, press Ctrl+Shift+P (or Cmd+Shift+P on macOS) to open the command palette.
- Search for AL: Download Symbols and select it.
- The symbols for the Business Central base application will be downloaded. This step is necessary to enable IntelliSense and ensure your extension can reference standard Business Central objects.
Step 8: Start Developing
- Begin developing your AL extension by creating or modifying objects such as tables, pages, codeunits, and reports.
- Use the Ctrl+F5 shortcut in VS Code to build and publish your extension to the Business Central sandbox environment.
- Test your changes in the Business Central sandbox.
Step 9: Run the Code and Commit Changes
- After testing your changes, return to VS Code.
- Open the Source Control tab (click the icon on the left sidebar or press Ctrl+Shift+G).
- Stage your changes by clicking the + icon next to the modified files.
- Write a descriptive commit message and click the checkmark to commit the changes.
- Push your changes to the remote repository by clicking the Sync Changes button or running the following command in the terminal:
3. Troubleshooting
3.1 Common Issues
- Connection Errors: Ensure the launch.json file is correctly configured.
- Build Failures: Check for syntax errors or missing dependencies.
- Permission Issues: Verify that the user has sufficient permissions in Business Central.
3.2 Debugging
- Use the debugging tools in Visual Studio Code to step through the code.
- Check the Business Central event log for errors.
4. Conclusion
This documentation provides a detailed, step-by-step guide for creating and setting up an AL project using the Microsoft AL: Go PTE template on GitHub. By following these steps, you can quickly start developing extensions for Microsoft Dynamics 365 Business Central. For further assistance, refer to the official Microsoft AL documentation or reach out to the project maintainers.
Thank you!
Raj Girish Deulkar
ERP Engineer
D365 Business central
Addend Analytics
Addend Analytics is a Microsoft Power BI-partners based in Mumbai, India. Apart from being authorized for Power BI implementations, Addend has successfully executed Power BI projects for 100+ clients across sectors like Financial Services, Banking, Insurance, Retail, Sales, Manufacturing, Real estate, Logistics, and Healthcare in countries like the US, Europe, Switzerland, and Australia. Get a free consultation now by emailing us at kamal.sharma@addendanalytics.com