I have a microflow call in javascript using mx.data
. The mx.ui
provides a progress bar. How can I rewrite my code for mx.ui
, or provide a progressbar using mx.data
? Thankyou
mx.ui:
mx.ui.action("MyFirstModule.StartEngine", {
context: new MxContext(),
progress: "modal",
callback: function(result) {
console.log("Engine started: " + result);
}
});
mx.data:
mx.data.action({
params: {
applyto: "set",
actionname: "MyFirstModule.GetFavoriteFood",
xpath: "//MyFirstModule.Cat",
constraints: "[id=281530811285515 or id=281530811285506]",
},
callback: function(obj) {
// expect single MxObject
alert(obj.get("manufacturer"));
},
error: function(error) {
alert(error.description);
}
}, this);