How to dot-walk from 'task_sla' table to 'incident' table?

Mazin AliKarar
Mega Expert

Hi all,

I am configuring a notification on 'task_sla' table to send a notification when an incident breaches while the requester is a specific user (for example CEO).

The notification works fine except that I got stuck where I could not jump from 'task_sla' table to 'incident' table to specify the Requester (caller_id) as CEO.

 

This is a screenshot of the notification:

find_real_file.png

 

This is the condition where I need to specify the Requester(caller_id) as CEO:

find_real_file.png

 

The 'incident' table has 2 fields that I want to check for (caller_idu_on_behalf_of). if the CEO is in either of these two fields the notification should be triggered in case of a breach.

 

Now the question is how can I jump to 'incident' table to check for  caller_id & u_on_behalf_of fields in the notification?

 

Best regards, 

Mazin 

1 ACCEPTED SOLUTION

i am not sure if you can able to fetch the caller id in condition builder but there is another way to build condition in notification by using advance condition, there you need to write the script that i had mentioned above.

The field should return 'true' or 'false'

sample script

eg:

var gr = new GlideRecord("incident");
gr.addQuery("number", current.task.number);

gr.addQuery("caller_id","<pass the sys id of that caller>");
gr.query();
if (gr.next())
{
answer false;
}

else

{

answer true;

}

 

 

 

View solution in original post

10 REPLIES 10

Deepak Ingale1
Mega Sage

You can do the dot walk via TASK field on TASK SLA table and access caller_id and other custom field

 

I am afraid not possible.

Below is a screenshot of all 'task' table fields referencing 'user' table.

the 'caller_id' and 'u_on_behalf_of' fields belong to 'incident' table only. 

 

find_real_file.png

Harsh Vardhan
Giga Patron

Mail Script:

 

var gr = new GlideRecord("incident");
gr.addQuery("number", current.task.number);
gr.query();
if (gr.next())
{
email.setSubject("SLA warning for " + gr.number + " (" + gr.caller_id.name + ")");
template.print("Caller: " + gr.caller_id.name);
}