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 @DeepikaR1661877 ,
Try this:
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');
var sysIdsArray = allowedGroups.split(',');
encodedquery = 'sys_idIN' + sysIdsArray.join(',') + '^type!=permission';
}
return encodedquery;
}
Thanks
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @ Anand2799 ,
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
Seems you missed my earlier response
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @DeepikaR1661877 ,
Updated code: You need to pass sys_id of itil type not string
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');
var sysIdsArray = allowedGroups.split(',');
encodedquery = 'sys_idIN' + sysIdsArray.join(',') + '^typeNOT LIKE1cb8ab9bff500200158bffffffffff62^ORtypeISEMPTY;
}
return encodedquery;
}
Add this to reference qualifier script:
javascript: new <Your Script Include>().getAssignmentGroups(current);
Make sure to check glide Ajax/client callable on script include form.
Thanks
Anand