Fetching all the task numbers from the problem task table.

shrinivasprasad
Tera Expert

Hi Community,

In problem record i have created only one problem task and trying to display in the notification but it is showing all the notification from the problem task table.

I have written mail script to get these problem tasks.

Code:

var gr = new GlideRecord("problem_task");
gr.addQuery("problem_id", current.sys_id);
gr.query();
while(gr.next()) {
template.print(gr.getDisplayValue('number') + "<br>");
}

find_real_file.png

find_real_file.png

Any suggestions please.

Thanks,

Shrinivasprasad

1 ACCEPTED SOLUTION

Made some edits to the code. Can you use the recent one. Also, use the exact field name for the known_error_field_name. I just used a variable name.

View solution in original post

25 REPLIES 25

Use the following

gr.addQuery("problem", ''+current.sysapproval);

OR

gr.addQuery("problem", ''+current.document_id);

Either of them should work

Thanks

yes now it is working could you please help me in fetching known error number link to ITIL from the notification.

i am trying get the known error number once we click on it from the notification to ITIL view.

I dont get it. Can you please elaborate a bit more?

Is it a record where you want to navigate?

Thanks

Hi Sukhbir,

once we click on hilighted Known error number it should navigate to ITIL view and it should open the same record and it is in the problem table notification.

 

find_real_file.png

Is this known error number field on problem table?