diff --git a/Core ServiceNow APIs/GlideRecord/Fetch active incidents assigned to a specific group./README.md b/Core ServiceNow APIs/GlideRecord/Fetch active incidents assigned to a specific group./README.md new file mode 100644 index 0000000000..1e2554d340 --- /dev/null +++ b/Core ServiceNow APIs/GlideRecord/Fetch active incidents assigned to a specific group./README.md @@ -0,0 +1,2 @@ +This script basically built to pull active incidents for a particular group in order to act quickly. +Demo script retrieves all active incidents assigned to the "Network Support" group. diff --git a/Core ServiceNow APIs/GlideRecord/Fetch active incidents assigned to a specific group./code.js b/Core ServiceNow APIs/GlideRecord/Fetch active incidents assigned to a specific group./code.js new file mode 100644 index 0000000000..e5b58d7550 --- /dev/null +++ b/Core ServiceNow APIs/GlideRecord/Fetch active incidents assigned to a specific group./code.js @@ -0,0 +1,9 @@ + +var gr = new GlideRecord('incident'); + gr.addQuery('active', true); + gr.addQuery('assignment_group.name', 'Network Support'); + gr.query(); + + while (gr.next()) { + gs.info('Incident Number: ' + gr.getValue('number')); + }