When a company Cl is selected, the assignment group of the incident/problem/change should go to the
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2023 01:59 AM
When a company Cl is selected, the assignment group of the incident/problem/change should go to the support group or that CI. If Incident is created though self-service, or support group isn't listed on the CI, incident will go to general tech team of the caller

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2023 02:34 AM
okay here is the sample script not tested
Script Include:
checkCIGroup: function(){
var ciID = this.getParameter('sysparm_CI');
var ci = new GlideRecord('cmdb_ci');
ci.addQuery('sys_id',ciID);
ci.query();
if(ci.next())
{
return ci.fieldname; // group sysid from CI table support group field
}
},
Client script onchange on CI field
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var ga = new GlideAjax('scriptincludename');
ga.addParam('sysparm_name','checkCIGroup'); //script include function name
ga.addParam('sysparm_CI',newValue);// send ci sysID
ga.getXML(getInfo);
function getInfo(response) {
var info = response.responseXML.documentElement.getAttribute('answer');
g_form.setValue('assignment_group',info);
}
}
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2023 02:10 AM
1.To achive this you would need to create multiple Client script with ajax for each tables like INC,PRB,CNG. (based on your business need).
2. You would need to create a common script include that gets you the sys_id of the support group when a CI is SELECTEDor UPDATED.
3. You would have to handle your script logic to check if sys_id returned by script include is empty or if it is self-service to set the default servicegroup.
I hope this helps !
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2023 02:40 AM
can you update the logic for script include and client script

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2023 02:15 AM
Hi @rajachodisetti ,
Go with assignment rules, client script is not required at all, challenge if someone is suggesting using client script, unless there is a specific use case which can't be handled by assignment rules.
Aman Kumar