Options

Javascript Add-in Webclient Error "Method XYZ was not found in the control add-in"

sradloffsradloff Member Posts: 2
edited 2017-06-14 in NAV Three Tier
Dear colleagues,

I've created a simple javascript add-in for NAV2016 that works fine in the Windows client.
It's just a textarea with an event and custom methods to set and get the textarea content.

The error message "method "my-method-name" was not found in the control add-in" comes up when using the same page in the web client.
I've double checked allmost everything+
-restarted the NST and IIS sebsite several time
- deleted all add-ins
- deleted the object from the object metadata table
- ...
- if I change the action to another method, the message changes, too: method "the-other-method name" was not found...
-
The error is not very popular in google, so I hope that there is a expert in the community, who had this error in the past and could solve it.

Thanks in advance
Sebastian

Answers

  • Options
    sradloffsradloff Member Posts: 2
    [UPDATE]
    I installed the add-in in a NAV2017 database and it worked in the windows client, as well in the web client.
  • Options
    LerxxLerxx Member Posts: 10
    I don't know if it still helps but for the webclient you have to add functions to your javascript like this:

    window.myFunction = function (myParameter) {
    myExecutedCode;
    };

    and let your NAV/BC Now what this is by adding

    procedure myFunction(myParameter: Text);

    to your ControlAddIn.

    (i just have experience in AL Javascript not in C/AL, so it might not work like this in C/AL)
  • Options
    Maria-SMaria-S Member Posts: 90
    edited 2020-03-20
    Hi @Lerxx,

    Could you please advice where exactly should this funciton be added?

    window.myFunction = function (myParameter) {
    myExecutedCode;
    };

    Thanks!
Sign In or Register to comment.