Dynamic Filter Option is not working when calling Script Include inside it
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I am trying to create new Dynamic Filter Option to reset the SLAs.
I have try to create both Client Callable as well without Client Callable Script Include and trying to call in the Dynamic Filter but it is not going inside the function created in Script Include. What is the reason why it is not going inside the functions?
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
can you share the script?
Raghav
MVP 2023
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
getassignment: function()
{
gs.info('ankit6---------');
var parentGroupSysId = '53f16946876e61141c5e63170cbb3537';
var allChildGroups = recursChildGroups(parentGroupSysId, []);
var checkgroup = allChildGroups.indexOf('1369b4b4c3eb56d065365083e4013181');
gs.info('ankit11---------'+checkgroup);
gs.info('ankit12---------'+current.assignment_group);
if (checkgroup == -1) {
gs.info('ankit14---------'+checkgroup);
return;
}
function recursChildGroups(groupId, finalArr) {
if (!finalArr) {
finalArr = [];
}
var gr = new GlideRecord('sys_user_group');
gr.addQuery('parent', groupId);
gr.addQuery('active', true);
gr.query();
gs.info('ankit27---------');
while (gr.next()) {
if (finalArr.indexOf(gr.sys_id.toString()) === -1) {
gs.info('ankit31---------');
finalArr.push(gr.sys_id.toString());
}
recursChildGroups(gr.sys_id.toString(), finalArr);
}
gs.info('ankit37---------'+finalArr);
return finalArr;
}
checkuser(current.sys_updated_by,allChildGroups);
function checkuser(user_name,groups)
{
gs.info('ankit46---------');
var grmem= new GlideRecord('sys_user_grmember');
grmem.addEncodedQuery('group.sys_idIN'+groups+'^user.user_name='+user_name);
grmem.query();
if(grmem.hasNext())
{
gs.info('ankit52---------');
return true;
}
else{
return false;
}
}
},
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago