How can i get a value from a Web Addin

hoffihoffi Member Posts: 3
edited 2017-08-09 in NAV Three Tier
Hello ,

i have some problems to get a value from a Web Addin.
So my Interface function is:

[ApplicationVisible]
string GetValue(ref string strReturn);


The funkttion is JS (TS)is:

function GetValue(strReturn: string): string {
strReturn = 'Ref return text ..A500';
return 'Simple return';
}


The call in C/AL lock like this:

test1:= CurrPage.WebCtrl.GetValue(test2);


Both C/AL variables test1 and test2 are empty. If i call the funtion in any browser the returns are well.
I know, i can trigger any calls from JS via Microsoft.Dynamics.NAV.InvokeExtensibilityMethod. But this is not my solution.

thx in advance
hoffi

Answers

  • EvREvR Member Posts: 178
    You've answered your own question. InvokeExtensibilityMethod is your only option.
    You cannot return an object directly from a javascript method to NAV. Unfortunaly.... it's a crappy solution.
  • hoffihoffi Member Posts: 3
    i kow i konw...thx for replay.
    [OT]Any HTTP respose can inculde data. The Web client is based on it....BUT NAV is other as others...[/OT]
Sign In or Register to comment.