How to sync the assignment group of the RITM and Catalog Task?

aimughal
Tera Contributor

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

1 ACCEPTED SOLUTION

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

 

 

View solution in original post

9 REPLIES 9

DanielCordick
Mega Patron
Mega Patron

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?

James Chun
Kilo Patron

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

Hi James,

 

as in synced at all times, if the ritm assignment group is updated then the task should be updated too

 

Thanks

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?