Need help in Workflow and Flow Designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I have a requirement to assign the newly created tasks from assignment_group1 to assignment_group2.
We have more than 150 catalog items in our instance, I'm planning to create an incident mentioning the REQ/RITM details and assign to our queue using business rule, once the incident is created then I will check and replace the assignment group.
what is the easiest or other way to work on this requirement?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Admin7267 ,
Since your requirement is asynchronous reassignment of tasks post RITM creation, Using Flow Designer is generally a better option. Create a flow that triggers on RITM creation and use inline scripting or decision logic to override assignment group from assignment_group1 to assignment_group2.
If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
You can simply use Assignment rules for this requirement,
If this is for re-assignment from Group 1 to Group 2, you can specify it in filter conditions. If it cannot be achieved using filter conditions, you can define using scripts.
If this helped to answer your query, please accept the solution and close the thread.
Thanks,
Bhuvan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Admin7267
May you try via Business Rule
Create an after > insert Business Rule on the sc_task (and/or sc_req_item, depending on where you want the reassignment).
Contition: Item > <name_of_catalog(s)>
Code:
(function executeRule(current, previous /*null when async*/) {
var oldGroup = 'sys_id_of_assignment_group1';
var newGroup = 'sys_id_of_assignment_group2';
if (current.assignment_group == oldGroup) {
current.assignment_group = newGroup;
current.update();
}
})(current, previous);