- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2018 10:49 PM
Hello all,
I have a requirement, where we go to the user from > groups related list > edit button
In the edit member page I need to filter the groups with type - 'itil'. User should not be able to edit this filter, but can add more filter conditions if required. I tried using sysparm_query in URL but that is editable.
I think it can be done with sysparm_fixed_query. But unfortunately not working. Am I using it in a wrong way?
Can anyone help me with this or provide me with suggestion on this.?
Thanks in advance,
Karishma
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2018 12:16 AM
Try below code in before Query BR,
(function executeRule(current, previous /*null when async*/) {
gs.addInfoMessage('test URL.... '+gs.action.getGlideURI());//.get('sysparm_collection')) ;//.toString().indexOf('Search String')
// =
if(gs.action.getGlideURI().get('sys_target')=='sys_user_grmember' && gs.action.getGlideURI().get('sysparm_type')=='M2MList' && gs.action.getGlideURI().get('sysparm_processor')== 'M2MList'){
current.addEncodedQuery('typeLIKE1cb8ab9bff500200158bffffffffff62');
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2018 11:02 PM
Hello,
Can you check this post: https://community.servicenow.com/community?id=community_question&sys_id=7358c3eddb1cdbc01dcaf3231f961909&view_source=searchResult
It is explaining the same requirement
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2018 12:19 AM
Hello,
Has this answered your query? If yes please mark the correct answer.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2018 11:10 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2018 11:31 PM
Try below code in before Query BR,
(function executeRule(current, previous /*null when async*/) {
try{ /
if(
GlideTransaction.get() &&
GlideTransaction.get().URL == '/xmlhttp.do' &&
GlideTransaction.get().getRequestParameter('sysparm_processor') == 'M2MList' &&
GlideTransaction.get().getRequestParameter('sys_target') == 'sys_user_grmember'){
current.addEncodedQuery('typeLIKE1cb8ab9bff500200158bffffffffff62');
}
}
catch (error){
gs.addErrorMessage(error, 'user query BR');
}
})(current, previous);