How to hide permission group in Assignment group in task table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello everyone,
I have one recruitment, that's in task table assignment group i want only hide the permission group(type is permission) already having the reference qualifier, using script include to call the function, in SI i change the condition but it's not working, below is the SI, here i want to add the condition like i need hide the type is permission, can some help me,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
HI may be can you try like this ,
and Ensure the Script Include is set to Client Callable = true -
and In the reference qualifier of the field (e.g., Assignment Group), use:
getAssignmentGroups: function(current) {
var encodedquery = '';
if (current.getValue('u_type') == 'escalation_task') {
var allowedGroups = gs.getProperty('sn_si.sap.sec_inc.escalation_task.allowed.groups');
if (allowedGroups) {
var sysIdsArray = allowedGroups.split(',');
// Build encoded query: include allowed groups and exclude 'permission' type
encodedquery = 'sys_idIN' + sysIdsArray.join(',') + '^type!=permission';
}
}
return encodedquery;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @ChallaR ,
It's not working actually, it's allow to save the type is permission groups in assignment group.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
HI @DeepikaR1661877 ,
The type field is glide list type so it holds sys_id of "sys_user_group_type"
in that case you should use sysIds to include in query. can you once try this .
If my response helped please mark it correct and close the thread so that it benefits future readers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
type field is glide list type so it holds sys_id of "sys_user_group_type"
But you are adding name in comparison in query.
So you should use sysIds to include in query
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader