Copying RITM worknotes and comments to TASK are generating duplicate comments on RITM activity
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-05-2020 01:12 PM
Hi Team,
Could you please help me to remove Task work_notes and comments from RITM Activity.
Here is my business rule
written on Before Update
(function executeRule(current, previous /*null when async*/) {
var gr = new GlideRecord('sc_task');
gr.addQuery('request_item',current.sys_id);
gr.query();
while(gr.next())
{
//gr.comments = current.comments;
gr.work_notes = current.work_notes;
gr.comments = current.comments;
gr.update();
}
// Add your code here
})(current, previous);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-06-2020 05:24 AM
How many business rules total are running? Is is just copying from RITM -> Task or does it copy both ways to keep RITM/Task in sync?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-23-2022 08:12 AM
For me it is duplicating once on RITM. It's because of the other business rule which is to copy updated thing from task to RITM.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-06-2020 06:34 AM
@Elijah Aromola there two business rules are running on before update
one is on sc_req_item table which will move the comments to related task and another if for sc_task table which move the comments to RITM which is working fine but it is throwing back to RITM activity if we changed comments from RITM side.