Assignment group Assign To is not populated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2022 11:46 PM
Hello All,
My requirement is in the service portal create incident part I have created some variables in which when category is hardware and sub category is mouse,
then Assignment group should be Hardware
Assign To should be Fred Luddy
I have written below script but the category and subcategory is working properly but assignment group and assigned_to is not populate.
if(producer.category == 'hardware' && producer.sub_category == 'mouse'){
current.setDisplayValue('assignment_group', 'Hardware');
//current.assignment_group = '8a5055c9c61122780043563ef53438e3';
current.setDisplayValue('assigned_to', 'Fred Luddy');
}
let me know what is issue with my script.
Thanks & Regards
Keval
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2022 07:57 AM
Hi
I don't see any issue with your script. Just check on few points the value which you are checking for Category and Sub category are correct or not.
You should be using the value of choice and not label when you are checking for Hardware and Mouse.
Please use the script as below:
if(producer.category == 'hardware' && producer.sub_category == 'mouse'){
current.assignment_group= 'Sys ID of Hardware';
current.assigned_to= 'sys id of User';
}
If this does not work then share a screenshot of your choice where you have configured them and the script which you have updated to assist further.
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke