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

Daniel Oderbolz
Kilo Sage

I know this is an old Thread, but still: 

The simplest approach in my opinion is to use a database view, there is an OOTB one called incident_sla. It joins task_sla and incident and allows to access all the fields of incident directly.


If this answer was helpful, I would appreciate if you marked it as such - thanks!

Best
Daniel