- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2018 05:17 AM
Hello,
I am a beginner in ServiceNow and I wondered if it was possible to assign an incident to an assignee group that is the same that the supported group of the CI mentioned (in the incident).In terms of qualification it looks like "inc.assignment group == cmdb_ci.supported group".
I have read about the assignment rules in ServiceNow, but it doesn't exactly match with what I want to do.
Thank you in advance for your help.
Solved! Go to Solution.
- Labels:
-
Personal Developer Instance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2018 02:26 PM
hi Max,
Perhaps you can try create a onChange ClientScript to capture the default Assignment Group on an incident.
Below are the quick sample code i did:
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
//Type appropriate comment here, and begin script below
if(newValue)
{
var caller = g_form.getReference('cmdb_ci', doAlert); // doAlert is our callback function
}
}
function doAlert(caller) { //reference is passed into callback as first arguments
//alert('here='+caller.support_group);
if(caller.support_group)
{
g_form.setValue('assignment_group',caller.support_group);
}
//else, clear the assignment_group if you wish.
}
Hope this helps.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2018 02:26 PM
hi Max,
Perhaps you can try create a onChange ClientScript to capture the default Assignment Group on an incident.
Below are the quick sample code i did:
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
//Type appropriate comment here, and begin script below
if(newValue)
{
var caller = g_form.getReference('cmdb_ci', doAlert); // doAlert is our callback function
}
}
function doAlert(caller) { //reference is passed into callback as first arguments
//alert('here='+caller.support_group);
if(caller.support_group)
{
g_form.setValue('assignment_group',caller.support_group);
}
//else, clear the assignment_group if you wish.
}
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2018 08:43 PM
You can write below script as before business rule on incident table
if (!gs.nil(current.cmdb_ci.support_group)) {
current.assignment_group = current.cmdb_ci.support_group
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2018 08:14 AM
Hi Deepak,
Thank you for your answer.
The script you sent me doesn't work actually. As I told to Bryan, when I select the CI in a new inicdent, the Assignment group stay empty, instead of taking the CI's support group value (see attachment in the reply to Bryan).
But maybe my business rule is not well designed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2018 07:57 AM
Hi Bryan,
Thank you for your answer.
Unfortunately, when I select the CI in a new inicdent, the Assignment group stay empty, instead of taking the CI's support group value (see attachment)
In the attachment, the Incident's assignment group should be "Software" which is the SAP Financial Accounting's support group.
Thank you in advance for your help.