Setting Assignment Group based on Idea Category

Kumari Divya
Giga Guru

Hi @LL i need to set the assignment group and assigned to based on the Idea category.

KumariDivya_0-1706766800827.pngKumariDivya_1-1706766954915.png

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

0 REPLIES 0