how to return a value from control add-in procedure?

How can I return a value from control add-in procedure?

If it is not possible then what is the workaround?

Some more details will help us to answer?

I’m using a javascript control add-in. I have created a ‘controladdin’ in business central which call a javascript funcion. I need to return a value from javascript to controladdin. I have used this ‘controladdin’ in one of my page extensions as usercontrol. The problem is that I cannot return a value from my controladdin to my page extension.

Here is an article, written by Vjekoslav Babić, that describes how to pass the JSON from the JavaScript control add-in to the C\AL code:

http://vjeko.com/passing-json-javascript-cal/

Probably, you can do something similar in your case.

1 Like

I dint used till now but see if this link helps

https://community.dynamics.com/nav/b/navigateintosuccess/archive/2014/12/31/passing-json-from-javascript-to-c-al