Hello,
We would like to limit the number of work orders that a user can perform a bulk status change to through the Work Order Tracking List View. Our users do still need the bulk status change option from the list view, so we can't remove it completely. But we want to put a limit on it to minimize the potential damage done. (we recently had an 'oopsie').
I'm very close with the automation script below. It successfully stops the status changes if the user attempts to process more than 25 records...
Launch Point is: WORKORDER Object, on Update, Before Save
if interactive:
session=service.webclientsession()
app = session.getCurrentApp()
if app.onListTab():
#To get the quantity of work orders in list view
selectionsize=app.getResultsBean().getMboSet().getSelection().size()
if selectionsize>25:
service.error("BulkChangeLimit", "ExceedsLimitForBulkStatusChange")
BUT it raises the error for every WO in the MboSet (see below). I want to just raise the error once and then stop iteration through the MboSet.
Does anyone know how to do that? Or if you would tackle this a different way, I'm happy to hear about that too!
Thanks,
Ryan
------------------------------
Ryan Coghlin
------------------------------
#AssetandFacilitiesManagement#Maximo