Skip to content

Commit ce420ac

Browse files
authored
Get list of update set types (ServiceNowDevProgram#1485)
* Create Get list of Update Set types This snippet outputs a list of module types included in an update set. By checking the included module types before committing an update set, you can be sure you aren't including any unintended updates. * Delete Background Scripts/Get list of Update Set types * Get a list of Update Set types This snippet outputs a list of module types included in an update set. By checking the included module types before committing an update set, you can be sure you aren't including any unintended updates. * Create README.md
1 parent 31a9ecd commit ce420ac

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This snippet outputs a list of module types included in an update set.
2+
By checking the included module types before committing an update set, you can be sure you aren't including any unintended updates.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
function getListOfUpdateSetTypes(update_set){
2+
var result = []
3+
var gr = new GlideAggregate('sys_update_xml');
4+
gr.addQuery('update_set', update_set);
5+
gr.groupBy('type');
6+
gr.query();
7+
while(gr.next()){
8+
result.push(gr.type.getDisplayValue())
9+
}
10+
return result;
11+
}
12+
13+
getListOfUpdateSetTypes('update_set_sys_id');

0 commit comments

Comments
 (0)