- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2022 11:28 PM
Hi All,
My requirement is , Auto populate Ritm assignment Group based on catalog task assignment group. Please help me on this.
Thanks,
Suresh
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2022 08:57 AM
Hi Suresh,
You want to populate same catalog task assignment group in RITM assignment Group??
if Yess, then
Create BR
Script:
(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);
If my response is helpful, then Please mark as Correct Answer/Helpful.
Please check and let us know.
Thanks 🙂
Shakeel Shaik.
Shakeel Shaik 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2022 08:36 AM
Hi Suresh,
Do you have any workflow running on RITM? you can add script in create task activity to populate RITM assignment group.
current.assignment_group = task.assignment_group
if you have to do it for all the tasks in general, you should write a after BR running on insert and update on sc_task table to sync the assignment group from task to ritm. in this case also think about if there are multiple tasks to a RITM then which task's assignment group should be populated.
Regards,
Shivambi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2022 08:56 AM
Hi Shivambi,
Can you please provide Business script for that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2022 08:38 AM
Hi Suresh,
What about having more than a unique task under RITM? If you only have one task, you can achieve by this using flow/workflow or using a BR on after over sc_task table and your code should be somehting close to this:
var grRITM = new GlideRecord('sc_req_item');
grRITM.get(current.request_item);
if(grRITM.next()) {
grRITM.setValue('assignment_group', current.assignment_group);
grRITM.update();
}
If it was helpful, please give positive feedback.
Thanks,
☆ Community Rising Star 22, 23 & 24 ☆
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2022 08:55 AM
HI,
Its not working