- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2022 12:17 AM
Hi folks,
I have the challenge that I need to restrict the selectable assignment groups for a specific Catalog item.
When a customer requests Item 'XYZ' from the Service Portal, the Fulfiller may only select Assignment Group A, B, and C in RITM and SCTASK.
I assume there is a way to realize with a script include but I do not know how to implement this.
Thanks for a little handy tip
Kevin
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2022 01:10 AM
Hi,
Update your reference qualifier [Assignment group] condition like below..
Script Include
var GetGroups = Class.create();
GetGroups.prototype = Object.extendsObject(AbstractAjaxProcessor, {
GetGroupsBasedonItem: function(Item) {
if (Item == '04b7e94b4f7b4200086eeed18110c7fd') { //here provide your item name
var list = [];
var grp = new GlideRecord('sys_user_group');
grp.addEncodedQuery('name=App Engine Admins'); //which groups you want to show
grp.query();
while (grp.next()) {
list.push(grp.sys_id);
}
return 'sys_idIN' + list.join(',');
} else {
grp = new GlideRecord('sys_user_group');
grp.query();
while (grp.next()) {
list.push(grp.sys_id);
}
return 'sys_idIN' + list.join(',');
}
},
type: 'GetGroups'
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2022 01:10 AM
Hi,
Update your reference qualifier [Assignment group] condition like below..
Script Include
var GetGroups = Class.create();
GetGroups.prototype = Object.extendsObject(AbstractAjaxProcessor, {
GetGroupsBasedonItem: function(Item) {
if (Item == '04b7e94b4f7b4200086eeed18110c7fd') { //here provide your item name
var list = [];
var grp = new GlideRecord('sys_user_group');
grp.addEncodedQuery('name=App Engine Admins'); //which groups you want to show
grp.query();
while (grp.next()) {
list.push(grp.sys_id);
}
return 'sys_idIN' + list.join(',');
} else {
grp = new GlideRecord('sys_user_group');
grp.query();
while (grp.next()) {
list.push(grp.sys_id);
}
return 'sys_idIN' + list.join(',');
}
},
type: 'GetGroups'
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2022 12:07 AM
Hi, I Hope my solution helps you, if it helps please mark my response as correct and helpful so that it will be helpful for the future readers