Hi Akash,
You can enable Disable during action boolean, it should solve this issue.
I dont see that option available for some reason on the button settings
Found a solution
Used this in the javascript snippet (Datasource)
(function() {
var form = this.mxform,
formWidgets = form.getChildren(true),
button = formWidgets.filter(function(w) { return w.declaredClass === 'mxui.widget.ControlBarButton'})[0],
grid = formWidgets.filter(function(w) { return w.declaredClass === 'mxui.widget.DataGrid'})[0],
context = this.mxcontext;
if(!button || !grid)
return;
button.onClick = function() {
var selected = grid.selection;
if(!selected.length) {
mx.ui.info('Select at least one row.', false);
return;
}
button.disable();
mx.ui.action('Domainname.Nameofthemicroflow', {
params: {
applyto: 'selection',
guids: selected
},
context: context,
origin: form,
callback: function() {/*closes the form so don't need to re enable*/ },
error: function() {
mx.ui.error("There was an error processing the request");
button.enable();
}
})
}
}.bind(this))();