Sending notification for SC_TASK commented

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2019 01:29 PM
Hello,
We do not allow our users to comment directly on an SCTASK. They actually don't see the SCTASK. Instead, they comment on the associated RITM and then those comments are copied to the SCTASK using the following code
(function executeRule(current, previous /*null when async*/) {
var comment = current.comments;
var requestedItem = new GlideRecord('sc_req_item');
requestedItem.get(current.request_item.sys_id);
requestedItem.comments= 'Comment added on ' + current.number + ' (' + current.short_description + '): \n' + comment;
requestedItem.update();
})(current, previous);
This takes the comment from the RITM and adds it to the communications tab at the top, as shown below:
I am needing a notification to be triggered to the Assigned to of the SCTASK once it has been updated with the additional comments from the RITM. Because these comments are not really part of the Activities stream, the normal notification condition of "Additional Comments changes" doesn't actually trigger a notification.
Does anyone know how I can get a notification to trigger based on this?
- Labels:
-
Notifications

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2019 01:34 PM
Hi,
How are those comments logged within the record? Can you not choose that field as updated or changes? And go that route. Secondly, what most do is add it as a work-note to the task with a prefix of something like: "Parent RITM commented with: ....".
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2019 01:37 PM
You might try creating an event in the Event Registry, then call it using the gs.eventQueue(event_name,record,parm1,parm2) function. You can then build a notification to be triggered by the event, and pass the Assigned to user's sys_id as parm 1 or parm2 to and tell the notification to send the email to the user specified in parm1 or parm 2.
Info on the Event registry can be found here.
Info on calling the event can be found here.
Info on notifications can be found here.