
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2024 02:09 AM
Hi,
I've a 3rd Party Integration. They raise a request from their tool and one REQ is being generated in ServiceNow through a catalog Item and corresponding RITM is being assigned to a particular Assignment group defined in the process.
However, I'm seeing an SCTask under that RITM is also being generated with blank Assignment group.
How I can copy the same assignment group from the RITM to underneath SCTask.
I'm thinking to write a BR in SCTask table where it'll copy the assignment group from RITM to that particular record in SCTask.
Can anyone please help on this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2024 02:41 AM
Hi @Bijay Kumar Sha ,
In the catalog item, there will be either flow/workflow attached. Please check that there will be one activity for creation of sctask. You can define the assignment group there or you can copy the same assignment group as of RITM as below in the catalog task in workflow:
You can achieve it via business rule on sc_task table:
(function executeRule(current, previous /*null when async*/ ) {
var ritm = new GlideRecord('sc_req_item');
ritm.addQuery('sys_id', current.request_item);
ritm.query();
if (ritm.next()) {
ritm.assignment_group = current.assignment_group;
ritm.update();
}
})(current, previous);
Mark this as Helpful / Accept the Solution if this helps
Mark this as Helpful / Accept the Solution if this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2024 02:41 AM
Hi @Bijay Kumar Sha ,
In the catalog item, there will be either flow/workflow attached. Please check that there will be one activity for creation of sctask. You can define the assignment group there or you can copy the same assignment group as of RITM as below in the catalog task in workflow:
You can achieve it via business rule on sc_task table:
(function executeRule(current, previous /*null when async*/ ) {
var ritm = new GlideRecord('sc_req_item');
ritm.addQuery('sys_id', current.request_item);
ritm.query();
if (ritm.next()) {
ritm.assignment_group = current.assignment_group;
ritm.update();
}
})(current, previous);
Mark this as Helpful / Accept the Solution if this helps
Mark this as Helpful / Accept the Solution if this helps.