- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2024 09:12 PM
Hello,
I have a requirement to send RITM SLA breach notification (75% and 90%) to associated catalog task's assignees.
Could anyone help on this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2024 10:04 PM - edited 07-14-2024 10:10 PM
HI @Annirnita Dash1 ,
Try something like below to pass the assigned to of sctask in the parm1:
Parameter 1 Script:
(function() {
var getTask = new GlideRecord('sc_req_item');
if (getTask.get(current.task)) {
var scTask = new GlideRecord('sc_task');
scTask.addQuery('request_item', current.task);
scTask.query();
while (scTask.next()) {
var assignee = scTask.assigned_to;
return assignee;
}
}
}());
In the notification, triggered by event. 'who will receive' will be as below:
Mark this as Helpful / Accept the Solution if this helps
Mark this as Helpful / Accept the Solution if this helps.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2024 10:07 PM
If this is a new SLA and new SLA workflow, I'd strongly suggest moving your logic to flow designer as workflow is now legacy and largely (some exceptions) not intended for new development.
Within the create event, you can run a glide record to set the parameter value of who will receive the notification
(function() {
//return current.task.assigned_to + "";
var scTaskGR = new GlideRecord('sc_task');
scTaskGR.addQuery('request_item' , current.getUniqueValue());
scTaskGR.addNotNullQuery('assigned_to')
scTaskGR.addActiveQuery();
scTaskGR.query();
var taskAssignedTo = [];
while(scTaskGR.next()){
taskAssignedTo.push(scTaskGR.getValue('assigned_to'));
}
return taskAssignedTo;
}());
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2024 10:04 PM - edited 07-14-2024 10:10 PM
HI @Annirnita Dash1 ,
Try something like below to pass the assigned to of sctask in the parm1:
Parameter 1 Script:
(function() {
var getTask = new GlideRecord('sc_req_item');
if (getTask.get(current.task)) {
var scTask = new GlideRecord('sc_task');
scTask.addQuery('request_item', current.task);
scTask.query();
while (scTask.next()) {
var assignee = scTask.assigned_to;
return assignee;
}
}
}());
In the notification, triggered by event. 'who will receive' will be as below:
Mark this as Helpful / Accept the Solution if this helps
Mark this as Helpful / Accept the Solution if this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2024 10:07 PM
@SN_Learn , Thanks a lot for the help, I will check this and get back soon. 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2024 03:49 AM
@SN_Learn This works well, thanks for the response, in addition to this I have a condition where I shall send notification to assignment group members if assignee is empty, I put something like below but it doesnot work:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2024 03:54 AM
Hi @Annirnita Dash1 ,
Havn't tested but the below line of code should be:
assignee = sc_task.assignment_group;
Should be:
assignee = scTask.assignment_group;
Try this and let us know.
Mark this as Helpful / Accept the Solution if this helps
Mark this as Helpful / Accept the Solution if this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2024 03:59 AM
@SN_Learn ok sure, got the point.
incase of sending it to an assignee, see it only send notification to the first ctask assignee, intention is to send it to all the assignees of catalog tasks associated