Setting Assignment Group based on Idea Category
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2024 10:10 PM
Hi @LL i need to set the assignment group and assigned to based on the Idea category.
I tried to search the category field in form layout but it is not present taking the value from the portal(server). I tried to create 1 business rule for fetching the value from the table -im_m2m_idea_category but it is not working.Table -im_m2m_idea_category mapped the idea and category table.
var gr = new GlideRecord('im_m2m_idea_category');
gr.addQuery('idea', current.short_description);
gr.query();
while(gr.next()) {
gs.addInfoMessage(current.short_description);
gs.addInfoMessage(gr.getValue('category_id'));
if(gr.getValue('category_id') == 'ITBM') {
current.assignment_group = "Default name1";
current.assigned_to = "TEST1";
current.update();
} else if (gr.getValue('category_id')== 'ITSM') {
current.assignment_group = "Default name2";
current.assigned_to = "TEST2";
current.update();
} else if (gr.getValue('category_id')== 'HR') {
current.assignment_group = "Default name3";
current.assigned_to = "Test3";
current.update();
}
}
})(current, previous);
Thanks in advance
- Labels:
-
Incident Management