Forum Discussion
christopher_gillis
7 years agoCommunity Manager
Hello,
It's not easily possible to disable this custom action as it doesn't exist as a CUI item.
That being said, you can achieve a similar result by prompting the user with an error message if two or more items aren't selected. You can do this by changing the action to an ItemType action. This kind of action is always available from the main grid if you're viewing an ItemType it's attached to. You can then check for the number of selected items in the grid with a code sample like below.
Christopher Gillis Aras Labs Software Engineer
var selectedItems = window.work.grid.GetSelectedItemIDs();
if (selectedItems.length < 2) {
return aras.AlertWarning("This action requires two or more items to be selected");
}
// Put actual method logic below here
Chris
Christopher Gillis Aras Labs Software Engineer