Question About field Additional Comments
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 07:30 AM
Hello Guys,
This is my mission:
"When the customer (requested for) - writes a comment (Additional comment) on the request: the comment will be copied to all open tasks."
I tried to use Business Rule but there is what happened:
* The Comment will not seen in the tasks of the RITM.
* The Comment write twice in the SOW view and in the RITM View.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2025 04:40 AM
Hi @ItayB ,
1. Either you can add setWorkflow(false) on the BR script as below
(function executeRule(current, previous /*null when async*/ ) {
var taskGr = new GlideRecord('sc_task');
taskGr.addEncodedQuery('request_item=' + current.getValue('sys_id') + '^stateIN1,2');
taskGr.query();
while (taskGr.next()) {
taskGr.comments = current.comments;
taskGr.setWorkflow(false);
taskGr.update();
}
})(current, previous);
or
2. check if there is any BR on sc_task table which contains current.update() statement in script
use script tracer to find out which script is responsible for duplicate comments
or a flow which is duplicating the comments check if there any flows triggered and duplicating the comments
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2025 05:10 AM
Hi @ItayB ,
Please use setWorkflowFalse() function.
(function executeRule(current, previous /*null when async*/ ) {
var taskGr = new GlideRecord('sc_task');
taskGr.addEncodedQuery('request_item=' + current.getValue('sys_id') + '^stateIN1,2');
taskGr.query();
while (taskGr.next()) {
taskGr.comments = current.comments;
taskGr.setWorkflow(false);
taskGr.update();
}
})(current, previous);
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards,
Mohammad Danish