need to get entire details about a incident

Mr_Blue
Tera Expert

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...... ]

1 ACCEPTED SOLUTION

it would be parent_incident , 

 

rl.addQuery('parent_incident', dts.sys_id);

View solution in original post

29 REPLIES 29

can you paste the screenshot. because above code i have tested in my personal instance and passing the incident number , which is giving me the child incident number . 

[0:00:00.019] Script completed in scope global: script
*** Script: Row Count is 0

i have attached it

find_real_file.png

it would be parent_incident , 

 

rl.addQuery('parent_incident', dts.sys_id);

Hello Harshvardhan, A Big thank you for sorting my issue ...Thanks a lot 🙂