- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2018 10:14 AM
Hi ServiceNow community members,
Does anyone know if it is possible to add the "Push to update set" option to the "Actions on selected rows" menu in the list view?
I would like to select multiple records in the list view and choose the "Push to update set" option from the "Actions on selected rows" menu in order to mass push these updates to an update set so that I don't have to go into each record and click on the "Push to update set" to push the update to the update set. Thanks in advance!
Solved! Go to Solution.
- Labels:
-
HR Service Delivery

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2018 10:49 AM
Sure. You can probably copy much of the code from your existing UI action. I've also created a UI action that does this and documented it at SNGuru.
https://www.servicenowguru.com/system-definition/manual-update-set-inclusion/
Based on that code, I was able to create a new UI action with the 'List choice' checkbox checked and the following in the 'Script' box.
//Push the update into the current update set
var um = new GlideUpdateManager2();
um.saveRecord(current);
//Query for the current update set to display info message
var setID = gs.getPreference('sys_update_set');
var us = new GlideRecord('sys_update_set');
us.get(setID);
//Display info message and reload the form
gs.addInfoMessage('Record included in <a href="sys_update_set.do?sys_id=' + setID + '">' + us.name + '</a> update set.');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2018 10:49 AM
Sure. You can probably copy much of the code from your existing UI action. I've also created a UI action that does this and documented it at SNGuru.
https://www.servicenowguru.com/system-definition/manual-update-set-inclusion/
Based on that code, I was able to create a new UI action with the 'List choice' checkbox checked and the following in the 'Script' box.
//Push the update into the current update set
var um = new GlideUpdateManager2();
um.saveRecord(current);
//Query for the current update set to display info message
var setID = gs.getPreference('sys_update_set');
var us = new GlideRecord('sys_update_set');
us.get(setID);
//Display info message and reload the form
gs.addInfoMessage('Record included in <a href="sys_update_set.do?sys_id=' + setID + '">' + us.name + '</a> update set.');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2018 11:41 AM
Thank you for your help Mark! Works like a charm and saved us quite a bit of time.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2018 11:49 AM
That's good to hear. Thanks for the feedback!