Add additional comments to RITM and Task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2020 06:44 AM
Will this script work to copy additional comments from RITM to Task and Task to RITM whichever one is updated with additional comments?
(function executeRule(current, previous /*null when async*/)
{
var com = current.comments;
var v_gRITM = new GlideRecord('sc_req_item');
v_gRITM.addQuery('sys_id', current.request_item);
v_gRITM.query();
if (v_gRITM.next())
{
v_gRITM.comments= current.comments;
v_gRITM.update();
}
})(current, previous);
(function executeRule(current, previous /*null when async*/) {
updateTasks();
function updateTasks() {
var sctask = new GlideRecord('sc_task');
sctask.addQuery('request_item', current.sys_id);
sctask.query();
while (sctask.next()) {
sctask.work_notes = 'Additonal Comment from RITM' + current.comments;
sctask.update();
}
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2023 01:49 PM
I have this working so I can enter comments on the task and it copies to RITM but I have to right click in header and hit save for it to work.
How can I get the post button to work at task level?