- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2022 09:46 AM
Hi All,
I have assignment_group field on Issues form(sn_grc_issue) which is extending from task, I have overridden it and also used Override reference qualifier. Now I want to apply reference qualifier through script include but it is not filtering based on script. It shows groups in group Hierarchy. Please let me know how to apply filter here.
var ProfileIssue = Class.create();
ProfileIssue.prototype = {
initialize: function() {
},
getGroups: function()
{
var grp = '';
var domain = new global.getCurrentSessionDomain().getDomain();
if(domain == 'b52aa9891b3e60101772bc16464bcb94')
{
getQuery();
}
function getQuery()
{
var gr = new GlideRecord("sys_user_group");
gr.addEncodedQuery("typeLIKE52bdff531b800d10037564a1604bcb35^typeLIKE778ffeff1bd1fc10c5f8ea0ee54bcbf0^ORtypeLIKE13af57ef1bc5b010c5f8ea0ee54bcbbe^sys_domain="+domain);
gr.query();
while(gr.next()) {
grp = grp + gr.sys_id + ',';
}
return 'sys_idIN' + grp;
}
},
type: ‘ProfileIssue'
};
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2022 08:03 PM
Hi,
no need to query; directly use this
var ProfileIssue = Class.create();
ProfileIssue.prototype = {
initialize: function() {
},
getGroups: function()
{
var domain = new global.getCurrentSessionDomain().getDomain();
if(domain == 'b52aa9891b3e60101772bc16464bcb94')
{
return 'typeLIKE52bdff531b800d10037564a1604bcb35^typeLIKE778ffeff1bd1fc10c5f8ea0ee54bcbf0^ORtypeLIKE13af57ef1bc5b010c5f8ea0ee54bcbbe^sys_domain=' + domain;
}
},
type: 'ProfileIssue'
};
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2022 11:32 AM
Hi Rafi,
You can call your script include using checking the
javascript: new sn_grc_advanced.ProfileIssue().getGroups(current)
Regards,
Deepankar Mathur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2022 07:51 PM
Hi Deepankar,
What is current here? what should I pass in the script include function?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2022 08:03 PM
Hi,
no need to query; directly use this
var ProfileIssue = Class.create();
ProfileIssue.prototype = {
initialize: function() {
},
getGroups: function()
{
var domain = new global.getCurrentSessionDomain().getDomain();
if(domain == 'b52aa9891b3e60101772bc16464bcb94')
{
return 'typeLIKE52bdff531b800d10037564a1604bcb35^typeLIKE778ffeff1bd1fc10c5f8ea0ee54bcbf0^ORtypeLIKE13af57ef1bc5b010c5f8ea0ee54bcbbe^sys_domain=' + domain;
}
},
type: 'ProfileIssue'
};
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2022 08:36 PM
Thank you so much it worked.