For today’s demo let us create an AL project/ AL Extension to display a warning message while opening blocked Customer record. [If you need help with setting up the correct environment for AL development in Visual Studio Code, you could chekc out the following post : Getting started with AL Programming in Visual Studio Code]
- Open Visual Studio Code
- Use Ctrl + Shift + P to access the command palette and type AL:GO!
- Enter the path where you would like to create a new workspace.
- You will notice that a workspace is created as below:
- In launch.json update the server instance and authentication.
If you are using port number different from the default one (7049) in Development tab in NAV server then you have to specify it in launch.json as “port” : your port number
- Once launch.json file is configured correctly then it’s time to download symbols. Click Ctrl+Shift+P to view the command palette and type AL:Download Symbols.
- Create a new file CustomerExt.al to script your customization.
- In CustomerExt.al use the below code:
- Press F5 to publish the changes.
- Navigate to Extensions mangement in NAV and you will see ‘Demo’ extension being installed.
- Navigate to Customers page and open a blocked Customer record to see the notification.
Vola! You have just completed your first AL project. Congrats 🙂