Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

How to setup control add-in in NAV2018 using AL

Posted on by 3,957

Hi,
I've setup a signature control add-in in NAV 2017 using the url "https://blogs.msdn.microsoft.com/nav/2014/10/09/extensibility-for-the-microsoft-dynamics-nav-tablet-client/"  But I want to setup it on NAV 2018.
Please suggest how am I supposed to do the same in NAV 2018 or Tenerife.
Thanks.

*This post is locked for comments

  • Olister Rumao Profile Picture
    Olister Rumao 3,957 on at
    RE: How to setup control add-in in NAV2018 using AL

    Hi,

    I've got control add-in in javascript that is drawing on a canvas. But I dont understand as to how shall I send the drawn canvas back to AL

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: How to setup control add-in in NAV2018 using AL

    This post shows how to call an Azure Function with AL. Consider if you really need an Azure Function, because if your addin is pure JavaScript you can use it in AL directly.

  • Olister Rumao Profile Picture
    Olister Rumao 3,957 on at
    RE: How to setup control add-in in NAV2018 using AL

    Hi Stefano,

    The control add-in contains a javascript file which is called through C# via  a .NET variable.

    But since .NET variable is not available I wanted to try using Azure Functions which can be called through a URL and call the javascript file. Is there anywhere I can find the javascript samples?

    I've referred this blog (vjeko.com/invoking-azure-functions-al)

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: How to setup control add-in in NAV2018 using AL

    You can't use a .NET (DLL) addin with AL. Your control addin must use javascript.

    [View:https://docs.microsoft.com/en-us/dynamics-nav/developer/devenv-control-addin-object]

    The AL declaration should be as follows:

    controladdin TestAddIn

    {

     Scripts = 'js/main.js';

     StartupScript = 'js/startup.js';

     event DemoEvent(prop1 : text[100]);

     procedure MyProcedure(Param : text[100]);

    }

    And you can reference the addin in your NAV page:

    page 50100 NAVPageWithAddin

    {   CaptionML =ENU= 'Test';

       layout

       {  

           area(Content)

           {

               group( test)

               {

                 usercontrol(ControlName; TestAddIn)

               {

                   ApplicationArea = All;            

                   trigger ControlReady()

                   var

                   begin

                       Message('NAV Addin Loaded');

                 }

               }

             }

       }

    }

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans