How to Create a NAV 2018 Extension Development Environment in Visual Studio Code

,

This guide will teach you how to setup an environment in Visual Studio Code to allow you to create extensions in NAV 2018. This guide assumes that you already have a web client setup for your database.

  1. Get your web client address for your database. For this example, we will be using: http://10.226.106.38:8080/DynamicsNAV110 
  2. Connect to the web client.

3. Go to the customer list and click on the first customer.

4. Click on the design button in the top right-hand corner and this will start design mode.

5. Add a field onto the card. To do this, click on “+ Field”, and then click and drag the “Telex No.” to the “Address & Contact” fast tab.

6. Click on “Stop designing”

 

 

7. Name the extension, enter the publisher and tick “Download Code”. Then click on “Save”.

 

8. This should automatically download a zip file of your extension.

 

9. Copy this file to the location where you want your Visual Studio Project to be located and then unzip the file.

10. Open Visual Studio Code and then open your project. 

11. Go to your “launch.json” file and fill in the connection details. For the Server, you will need to use the IP address instead of the server name. You will also need to add an extra property, which is the port. This property is referring to the NAV Development port. Make sure that you save your project.

12. Go to the “app.json” file and delete these lines.

13. Change the object ID range to your custom range.

14. Add in the below line: “target”: “Internal”, 

 

15. Save your project and then press “Ctrl+Shift+P”. This will bring up a menu. Select “AL:Download symbols”.

16. This should then download, continue to 17. If this does not download, continue to 16a.

 

Note: This should work automatically for a standard 2018 database. If you are using an upgraded/bespoke database, you may need to generate the symbols manually.

 

16a. Open command prompt, change your directory to the relevant NAV folder and run this command:  finsql.exe generatesymbolreference=yes

 

16b. Open your database and recompile all objects, then re-run step 15.

17. Check that the version of the files downloaded into your project match the version in the “app.json” file.

18. You are now ready to start creating extensions for your database.

The following two tabs change content below.