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

Thanks.

Replace

gr.addQuery("problem", current.sys_id);

with

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

 

But does your problem process follow approvals?

yes it follows

Thanks in that case above should help.

yes it is working now one more help jaspal service owner name not displaying in the same notification and it feteching from the assignment service owner. 

find_real_file.png

Where is Service Owner field is iton problem table or problem task?

Can you paste you complete mail script here.