- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2018 04:34 AM
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:
This is the condition where I need to specify the Requester(caller_id) as CEO:
The 'incident' table has 2 fields that I want to check for (caller_id & u_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
Solved! Go to Solution.
- Labels:
-
Incident Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2018 10:43 AM
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;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2018 09:00 AM
Hi Harshvardhan,
Thank you for the very helpful tips 😄
I understand that I can create a Mail Script and call it in the notification content to get the caller_id.
But, I still need to check for the caller_id in the notification condition in the "When To Send", because I want the notification to go if only the Requester is the CEO.
Will the Mail script work here? I doubt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2018 09:14 AM
I think you can easily compare the Title of the caller id in the condition builder.
In the condition builder click Show Related List and then expand Task and then expand Caller ID and select Title.
Compare the Title if CEO or Chief Executive Officer.
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2018 10:43 AM
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;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2018 12:42 PM
Thanks a lot 😄
I have got it working by writing a server-side script in the advanced condition script editor.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2018 01:00 PM
But I wouldn't suggest hardcoding. Because the CEO may change tomorrow.
And I am pretty sure, we can do dot-walking in condition and it will work.
Please mark this response as correct or helpful if it assisted you with your question.