Auto populate Assignment group based on CI related item service support group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2023 09:46 AM
Hi All,
I have a requirement to populate the assignment group based on CI related item Service support group .
see below screen shorts.
1. In the Incident form open the Configuration item
2. Open services related items under that CI
3. See the service Group in that
4. That assignment group need to populate Incident form assignment group
Kindly suggested me on this ,
Thank you !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2023 10:35 AM
Create a Client script like this:
Name : Populate assignment Group
Type : onChange
Field Name : cmdb_ci
Script:
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '')
return;
var ref = g_form.getReference('cmdb_ci');
g_form.setValue('assignmnet_group', ref.support_group); // support_group is the name of the field on cmdb from which you want to get the group
}
Thanks & Regards,
Eswar Chappa
Mark my answer correct and Helpful if this helps you 😀
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2023 10:45 AM - edited 08-28-2023 10:47 AM
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var ci = g_form.getReference('cmdb_ci', agLookup);
function agLookup(ci){
g_form.setValue('assignment_group', ci.assignment_group);
}
}
View
Thanks & Regards,
Eswar Chappa
Mark my answer correct and Helpful if this helps you 😀
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2023 11:55 PM
Thanks for your reply ,
As per my understand we have to write script in Assignment rules not in client script .
when incident form will open by automatically CI will populate ,that we cannot change .based on that CI related item service support group need to populate in incident form .
Any suggestions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2023 02:52 AM - edited 08-29-2023 02:54 AM
Hi @Reddy34
Every CI may have relationship or hosting or used by multiple Application Services. Do you have any specific criteria to choose any specific Application Services , As shown is your screenshot the same CI is used by SAP Controlling, SAP financial controlling etc, is that matters or you can select any? because this is very critical to determine which service to lookup for the support group for assigning the incident in this approach.
Also you need query the SVC_CI_ASSOC table to get all the Service Related to the CI and get the support group of the Service, so you need to have Script Include to get this value for the client script to populate the Assignment group.
I can help you with the script include if you need. Let me know if you have questions.
If my answer helped, please mark it helpful and correct. Thanks!
