Set Assignment group of sc_task in workflow

Saquib Mohammed
Mega Guru

I have a workflow on catalog item where I am assigning Assignment Group to the RITM and then creating a catalog task.

Then I have to assign a different assignment group to the catalog task that has been created. I am unable to figure it out. I am assuming I will need to use Run Script activity and create a glide record on sc_task table but beyond that I am unable to move ahead. I am new to this line of scripting - so any help is appreciated.

Below is the pseudo script I am thinking of.

var gr = new GlideRecord("sc_task");
gr.addQuery("request_item", "<how do I refer to current RITM here>");
gr.query();
if (gr.next()) {
<assign assignment group to the catalog task - how should this be scripted>
gs.update;
}

1 ACCEPTED SOLUTION

Prince Arora
Tera Sage
Tera Sage

@Saquib Mohammed 

 

Please pick the catalog task activity from the workflow activities as shown below:

 

 

PrinceArora_1-1681954255974.png

And in the fullfillment group you can mention your assignment group

 

PrinceArora_0-1681954214932.png

 

You don't require the scripting here, still just for your knowledge

 

var gr = new GlideRecord("sc_task");
gr.addQuery("request_item", current.sys_id);
gr.query();
if (gr.next()) {
gr.assignment_group = "SYS_ID_OF_GROUP"; 
gr.update;
}

If my answer solved your issue, please mark my answer as Correct & 👍Helpful based on the Impact.

View solution in original post

1 REPLY 1

Prince Arora
Tera Sage
Tera Sage

@Saquib Mohammed 

 

Please pick the catalog task activity from the workflow activities as shown below:

 

 

PrinceArora_1-1681954255974.png

And in the fullfillment group you can mention your assignment group

 

PrinceArora_0-1681954214932.png

 

You don't require the scripting here, still just for your knowledge

 

var gr = new GlideRecord("sc_task");
gr.addQuery("request_item", current.sys_id);
gr.query();
if (gr.next()) {
gr.assignment_group = "SYS_ID_OF_GROUP"; 
gr.update;
}

If my answer solved your issue, please mark my answer as Correct & 👍Helpful based on the Impact.