- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2023 06:08 PM
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;
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2023 06:33 PM
Please pick the catalog task activity from the workflow activities as shown below:
And in the fullfillment group you can mention your assignment group
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2023 06:33 PM
Please pick the catalog task activity from the workflow activities as shown below:
And in the fullfillment group you can mention your assignment group
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.