- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2020 08:20 AM
Hi all,
I want to Hide few fields in Incident form for certain groups accessing it in servicenow. how can i achieve this thorough UI policy or ACL or Business rule.
thanks
Siddharth
Solved! Go to Solution.
- Labels:
-
Application Portfolio Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2020 10:35 PM
Glad that it worked.
Would you mind marking my response as correct & helpful if I am able to resolve your query?
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
12-22-2020 02:44 AM
Hi,
you can configure system property to hold those group sys_ids
then query sys_user_grmember with the logged in user and group
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
12-22-2020 03:17 AM
So post creating a system property ('ABC' name) include the below change only to be done in Display BS rule logic
g_scratchpad.isMember = gs.getUser().sys_user_grmember('ABC');//system property name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2020 06:12 AM
Hi,
your system property would hold comma separated sys_ids of groups
so if you want to check if user is member of any of that group then you need to have gliderecord like this
var gr = new GlideRecord('sys_user_grmember');
gr.addQuery('user', gs.getUserID());
gr.addQuery('group', 'IN', gs.getProperty('property name'));
gr.query();
g_scratchpad.isMembeOfAtleast1Group = gr.hasNext();
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
12-22-2020 11:51 PM
Hello Ankur
I've created the system property BS Rule and Client Script as mentioned but the the fileds are visible to the user of one of the assignment groups (when I impersonated) to check
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2020 06:28 AM
Hello Ankur
your below suggestion helped!
var gr = new GlideRecord('sys_user_grmember');
gr.addQuery('user', gs.getUserID());
gr.addQuery('group', 'IN', gs.getProperty('property name'));
gr.query();
g_scratchpad.isMembeOfAtleast1Group = gr.hasNext();
what chages to be included to apply the same for hiding a related list and UI Action button (from those same set of assginment groups - for which I've created a system property)