How to auto populate Assignment Group , Category, SubCategory and service based on service offering
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2023 11:41 PM
for Incident How to auto populate Assignment Group , Category, SubCategory and service based on service offering.
i am trying on use client script on onchange but its working can one help.
below is script I have used.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var ser = g_form.getValue('service_offering');
if(ser == 'ALLIANCE BI');
{
g_form.setValue('category' , 'abce');
g_form.setValue('subcategory' , 'Business ');
g_form.setValue('assignment_group' , 'sap');
g_form.setValue('business_service' , 'SAP ALLIANCE');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2023 11:49 PM
It is better to use Data Lookup Definition instead of Client Script where no scripting is required.
In your new Data Lookup Definition, you can make 'service offering' as Matcher Field and Assignment Group , Category, SubCategory and service as Setter Field.
Now you can set values of these field for mapping.
This is best way in case of multiple values and mapping.
Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2023 04:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2023 11:07 PM
@Madhusudhan Ka1 @Madhusudhan Kan
Can you show what you have tried?
Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2023 01:42 PM
Have you tried using the assignment rule, I think you can achieve your requirement using the assignment rules, because you just want to set the assignment group, category and subcategory.
Please mark my answer as helpful, if it helped you accordingly!
Thanks,
Hari