Skip to content

Commit f1937fa

Browse files
List of child incident (#1059)
* Create listofchildIncident.js * Create readme.md * Update listofchildIncident.js This code will display all the Child Incident Numbers for the particular Incident. * Update listofchildIncident.js Changed Double Quotes to Single Quotes. Also updated INC Number to make it dynamic. * Update listofchildIncident.js Updated Code as mentioned.
1 parent b4570b0 commit f1937fa

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
var parentID = '9c573169c611228700193229fff72400'; // This should be stored in sys_property instead of hardcoding the sys_id.
2+
var inc = new GlideRecord('incident');
3+
inc.addEncodedQuery('parent_incident='+parentID); // sys_id of parent Incident
4+
inc.query();
5+
6+
if(inc.next()){
7+
gs.info('List of Child Incidents of:'+inc.getDisplayValue('parent_incident'));
8+
gs.info(inc.getValue('number'));
9+
}
10+
11+
while(inc.next())
12+
{
13+
gs.info(inc.getValue('number'));
14+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This code will help to show list of Incidents whih are child of a particular incident.

0 commit comments

Comments
 (0)