Quantcast
Channel: NAV Three Tier — mibuso.com
Viewing all articles
Browse latest Browse all 10032

Requesting NAV data from JS client add-in

$
0
0
Hi all,

Imagine the following situation.

A javascript client add-in. From the add-in I need to ask NAV to send me some data.
I can add an event handler to my add-in. Let's call it 'OnGetCustomerName'.

c#:
public delegate void GetCustomerNameEventHandler(string customerNo);
[ApplicationVisible]
event GetCustomerNameEventHandler OnGetCustomerName;


JavaScript:
var customerNo = '1000'
Microsoft.Dynamics.NAV.InvokeExtensibilityMethod("OnGetCustomerName", [customerNo]);


This will raise the event in C/AL and I can start getting the customer by its number. But I cannot return any data to the client add-in this way.
How could I return the customer name to the javascript add-in?

Gr, Erik

Viewing all articles
Browse latest Browse all 10032

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>