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");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.