How to update SC Task and RITM When requested for of a request update any comments in the Request?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2020 03:04 AM
How to update SC Task and RITM When requested for of a request update any comments in the Request?
Or
Is it possible to send notification to Assigned to user of catalog task when requested for user update any comments in the request?
Please suggest how can I notify to Assigned to/ Assignment group members of a task when a request work notes or additional comments updated by requested for of a request?
Regards,
Sruthi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2020 04:02 AM
We have this business rule in place to update the active Catalog Tasks whenever a comment is added to an RITM. This runs after Update on sc_req_item when Additional comments changes. You could try to add work notes to this, or create a second rule.
(function executeRule(current, previous /*null when async*/) {
var sctask = new GlideRecord('sc_task');
sctask.addQuery('request_item', current.sys_id);
sctask.addQuery('active', 'true');
sctask.query();
while(sctask.next()){
var curAC = current.comments.getJournalEntry(1);
sctask.comments = curAC;
sctask.update();
}
})(current, previous);
Now that the catalog task has been updated, that should trigger your notification to update assigned to when a task of theirs has been updated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2024 10:45 AM
Would it be possible to get this same script but for the other way around? So if a comment is entered at SCTASK level as an additional comment, it rolls up to the RITM as an additional comment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2024 12:18 PM
This Business Rule would run after Update on the sc_task table when Additional comments changes
(function executeRule(current, previous /*null when async*/) {
var ritm_gr = new GlideRecord('sc_req_item');
ritm_gr.addQuery('sys_id', current.request_item);
ritm_gr.query();
if(ritm_gr.next()) {
ritm_gr.comments = current.comments.getJournalEntry(1);
ritm_gr.update();
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2020 03:08 AM
Have you had a chance to try this solution?