- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2024 11:44 AM - edited 02-15-2024 11:59 AM
When a Task is created, how can I keep the Assignment group field in sync with the RITM assignment group field.
update: as in synced at all times, if the ritm assignment group is updated then the task should be updated too
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2024 11:32 AM
Hi @aimughal,
No worries, so it should be the other way around - Sync RITM's assignment group from the SCTASK? You can use the same condition but change the Table to Catalog task and use the script below:
(function executeRule(current, previous /*null when async*/) {
var ritmGr = new GlideRecord("sc_req_item");
ritmGr.get(current.getValue('request_item'));
if(ritmGr.isValidRecord())
{
ritmGr.setValue('assignment_group', current.getValue('assignment_group'));
ritmGr.update();
}
})(current, previous);
Just a reminder, I don't think this is a good process and I recommend revisiting it.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2024 11:49 AM - edited 02-15-2024 11:58 AM
You can do this in a flow or a business rule, To keep it simple and not incur tech debt, set this up in a flow, you can simply set the trigger to record created or updated on sc_task table, set your conditions, assignment_group changes could be a place to start,, then look up the RITM, grab the assignment group and set the assignment group on the task.
things to consider,
What happens when the ticket is passed to a new group?
What group do you sync to the RITM if there are multiple tasks for different groups?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2024 11:51 AM
Hi @aimughal,
When you say 'sync', are you saying the assignment group between two records should be synced at all times? Or the SCTASK's assignment group will inherit the assignment group of RITM during creation?
If it's the latter, you can configure it within your workflow/flow that is triggered from the RITM.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2024 11:59 AM
Hi James,
as in synced at all times, if the ritm assignment group is updated then the task should be updated too
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2024 12:01 PM
If this is the case, you can write a Business Rule on the RITM table to sync the assignment group. But I don't see this as a good process, why are you doing this?