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 12:23 AM
Hello,
Please use:-
if(producer.category == 'hardware' && producer.sub_category == 'mouse'){
var group='sysidofthegroup';
current.assignment_group.setDisplayValue(group);
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2022 12:24 AM
Can you add logs and check if the condition is getting satisfied and is coming into the loop

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2022 12:17 AM
Is the if loop being satisfied?
Also, is the record producer in global or scoped application? As it should be below
// GLOBAL
gr.setDisplayValue('field', 'value');
// SCOPED
gr.field.setDisplayValue('value');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2022 04:32 AM
Hello Jaspal Singh,
the script is not working in my scenario
gr.setDisplayValue('assignment_group', 'Hardware');
// SCOPED
gr.assigned_to.setDisplayValue('Fred Luddy');
Regards
Keval

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2022 04:38 AM
Regards,
Musab