Hide/show record as per roles
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-15-2016 08:38 PM
I want to hide records who have a specific type( type is field on form) if it is sla then it should be visible only for those users who have a role as sla.
Tried with some acls. now record info is not visible but the 'i' icon is still there and if user clicks that, it redirects to form. it looks like as below:
So in case it is not possible to hide record, atleast after clicking this I icon it should redirect to form only if a user with sla role clicks it. else it shouldn't work for othrt users.
Please suggest how to achieve this.
Thanks in advance
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-15-2016 08:59 PM
Hello Arohi,
Can you please share screenshot of ACL you have created. Also is this a OOTB table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-15-2016 09:16 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-15-2016 10:25 PM
hasRoleExactly is for client side scripting and if that was usable you should have g_user.hasRoleExactly('sla'); but here I think you would need to have gs.getUser().hasRole('sla');
Can read more about it here: https://developer.servicenow.com/app.do#!/api_doc?v=helsinki&id=r_GlideUser-hasRole_String
Only downpart is that if the user has the admin role and not sla role, it will still return true. But I don't think that matters in this case.
//Göran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-15-2016 11:07 PM
Sorry to say but it's not working. Records are still there in list view.