Hovering over preview icon does not respect hidden variable UI policy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2024 11:58 AM
I have a ui policy (tried also a client script) to hide certain variables if user doesn't have a role. This works properly, the issue is when a user is at a TASK level, and user clicks the 'i' icon next to the requested item to preview the record, those fields are visible.
I found a KB article from servicenow that says the best way to achieve this is via ACL but it doesn't explain how. Can someone help with an example?
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2024 01:34 PM
An easier approach is to remove the variable editor from this view as it is meant to be a record preview, not a snapshot. To do so, navigate to
<your instance name>.service-now.com/sc_req_item.do?sysparm_view=sys_popup
Enter the Form Layout then switch/ensure you are in the sys_popup view. Remove Variable Editor from the selected items and save.
Another approach is to set a read role permission on each variable definition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2024 06:20 AM - edited 12-06-2024 06:22 AM
Thanks for your reply. Adding the read role to each variable would be a perfect approach if this was applicable only at the RITM/TASK level or if i could script the permission because I need those fields visible when a user is trying to submit the form.
for your first solution, modifying the sys_popup view, i haven't been able to get to it by using the URL, it sends me to a new record, maybe because we have the next experience active? not sure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2024 08:54 AM
Sorry, I didn't explain that part which seems unexpected - when it opens a new record, that's where you want to be. Just right-click the gray header bar and choose Configure > Form Layout, then switch the View name to Sys_popup and remove Variable Editor from Selected:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2024 01:01 PM