9 Feb’18

D365 Business Central

Creating a Control Add-in using Javascript and calling it in AL.

Introduction:

In NAV 2017, control add-ins were called through .NET code which is imported as .ZIP files. With NAV 2018 .NET is not supported in extensions. Thus we’ve to perform the following steps to make a Control Add-in in Javascript.

Pre-requisite:

1. NAV-2018
2. VS Code

Procedure:

  1. Create a Startup script as start.js: Startup scripts are loaded whenever the NAV object containing the control add-in starts. Basically, the startup scripts are used for initialization.
  2. Create a Javascript file as demo.js : Contains most of the logic that the control add-in performs.
  3.  Create a control add-in object in AL: Control Add-in objects are used by NAV to register the control add-in and events and procedures on which the control add-in works.
  4. Create a NAV object using AL: This object generally contains the control add-in integrated into the standard, created or customized NAV objects. This object acts as the starting point where events are performed.
  5. Output:
    Added Control Add-In:

    Invoking on INIT:

    Script Invoking on Event:

Conclusion:

Thus, we can create control add-in using Javascript and access in NAV .AL objects using extensions

Written by

Olister Rumao

Software Engineer

2 thoughts on “Creating a Control Add-in using Javascript and calling it in AL.”

  1. Good afternoon,

    I have read your post and I have a question about it.
    I implemented an interface and generated a dll from the interface. It perfectly works for Dynacmics NAV 2016.

    Will this dll work on Dynamics NAV 2018?

    Thank you,

Leave a Reply

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

Want to streamline your business processes?

  • This field is for validation purposes and should be left unchanged.

Recent Articles

  • Integrate Dynamics 365 for Customer Engagement Apps with Microsoft Teams

    18 June’ 2019

    Before getting into details, firstly I would like to talk about Microsoft Teams. If you’re familiar with MS Teams, you...

    Read more
  • Applying Default / Mandatory Dimension in NAV / Business Central

    17 June’ 2019

    Introduction: In this blog, I aim to provide how to set Mandatory Dimensions on Items, Customers, Vendors, and G/L Accou...

    Read more
  • Automatically adding dimensions from Shortcut Dimension from Excel Import in Microsoft Dynamics NAV / Business Central

    17 June’ 2019

    Problem Statement: I have a requirement where the contents of the General Journals are to export to Excel and also can c...

    Read more
  • Using “startswith” Filter Query in MS Flow

    12 June’ 2019

    Introduction This blog explains how to use “startswith” filter query in MS Flow. Use Case Using MS Flows to retrieve...

    Read more
  • Print pro-forma invoice in Dynamics 365 Finance and Operations

    11 June’ 2019

    In this article I am going to demonstrate how to view/print  pro-forma invoice. A pro forma invoice is an invoice that ...

    Read more
  • We respect your privacy.
  • This field is for validation purposes and should be left unchanged.