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

[DotNet] Call async method from C/AL synchronously

$
0
0
Is there any way to call some DotNet async method from C/AL synchronously?

In C# it can be done like this:

Method definition:
public async Task<string> GetDataAsync(string parameter){}
Synchronous call:
string result = somObject.GetDataAsync(parameter).Result;

Unfortunately I can't translate this to C/AL. Property "Result" is not available, and without this part method is called asynchronously. Somehow I need to call this method synchronously, wait until it finishes and grab the result.

Viewing all articles
Browse latest Browse all 10032

Trending Articles



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