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
1
Answers
I installed the add-in in a NAV2017 database and it worked in the windows client, as well in the web client.
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)
Could you please advice where exactly should this funciton be added?
window.myFunction = function (myParameter) {
myExecutedCode;
};
Thanks!