- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2019 04:08 AM
Hello Guys,
What i want is ::> Need entire details about a ticket in "Script-background", All details like [ Child ticket, assigned to, Assigned group, summary, create on, and so on...... ]
Below code is not even showing me "Script-background", but its not giving me any output
var dts = new GlideRecord('incident');
dts.addQuery('number','INC0010120');
dts.query();
if(dts.next()){ dts.info(' exists'); } else { dts.info('does not exists'); }
Can some one please show me how to get all the details about a ticket in code [ Child ticket, assigned to, Assigned group, summary, create on, and so on...... ]
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2019 07:26 AM
it would be parent_incident ,
rl.addQuery('parent_incident', dts.sys_id);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2019 07:45 AM
I posted the code at the end of my previous post
var inc = new GlideRecord("incident");
var parentNumber = "INC0007001";
inc.addQuery("parent_incident.number", parentNumber);
inc.query()
while (inc.next()) {
gs.print(inc.number + " is child incident of " + parentNumber);
}
If you have a developer instance then you can start the exact code in background script (INC0007002 and INC0007001 exist on every developer instance as test data). You will see
INC0007002 is child incident of INC0007001
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2019 08:57 AM
Hello Oleg, Thanks Alot for helping me 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2019 09:00 AM
Thank you all for helping me here

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2019 09:04 AM
Glad i helped you.
kindly mark my response as correct and close this thread.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2019 09:42 AM
yup, Done already 🙂