Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Showing off how to use applyAsync to display a spinner while a long query is running in Aras Innovator.
var applyWithSpinner = async function(itm) {
aras.browserHelper.toggleSpinner(document, true);
var res = await itm.applyAsync();
aras.browserHelper.toggleSpinner(document, false);
return res;
// Create a query we know will take a while like querying for all Methods in the system
var longQueryItem = aras.IomInnovator.newItem("Method", "get");
var res = await applyWithSpinner(longQueryItem);
alert("Performed query and found " + res.getItemCount() + " Methods");

This comment has been minimized.

Copy link

@MAkallal MAkallal commented Mar 26, 2021

Interesting, however, how this code can be used with applyMethod() to call as server side method?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment