-=Apex 20.1=-
We have an IG report in which we've set the column APEX$ROW_ACTION to be Hidden. However, we've added a custom Delete button to the IG with custom action to display a confirmation before deleting the records, as shown below. The invocation of selection-delete is not working as expected. When I select few records and click on Delete it prompts me to confirm, when I press OK, it just refresh the IG.
toolbarGroup.controls.push({type: "BUTTON", action: "cust-del-pwd", label: "Delete", icon: "icon-ig-delete", iconBeforeLabel: true, hot: true});
config.initActions = function(actions){actions.add({name: "cust-del-pwd", action: function(event) {
var records = apex.region("CREDS\_IG").widget().interactiveGrid("getCurrentView").getSelectedRecords();
if (records.length > 0) {
var r = apex.confirm("Do you want to continue?");
if (r == true) {apex.region("CREDS\_IG").widget().interactiveGrid("getActions").invoke("selection-delete");}
}
}
});
};
Where: CREDS_IG is the static ID of the IG.

The following works just fine, however, I would like to display a confirmation dialog before deleting the records, hence the custom action.
toolbarGroup.controls.push({type: "BUTTON", action: "selection-delete", label: "Delete", icon: "icon-ig-delete", iconBeforeLabel: true, hot: true});
Any idea what is missing from that code?
Thanks in advance.