An AL Project Example

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]

 

  1. Open Visual Studio Code
  2. Use Ctrl + Shift + P to access the command palette and type AL:GO!

AL Extension

  1. Enter the path where you would like to create a new workspace.

AL demo

  1. You will notice that a workspace is created as below:

AL Extension

  1. In launch.json update the server instance and authentication.

AL launch.json

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

  1. 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.

command palette

  1. Create a new file CustomerExt.al to script your customization.

AL example

  1. In CustomerExt.al use the below code:

AL example code

  1. Press F5 to publish the changes.

AL example

  1. Navigate to Extensions mangement in NAV and you will see ‘Demo’ extension being installed.

Extension Management

  1. Navigate to Customers page and open a blocked Customer record to see the notification.

AL

 

Vola! You have just completed your first AL project. Congrats 🙂

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *