How can i hide a custom table(custom app) from admin ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2020 01:39 AM
I am trying to hide a custom table from admin. so that table is not shown in the application navigator while searching for it.
I created an ACL read for table and with unchecked admin override and a small script. I even did the same with write, create and delete ACLS(in case they are giving read access by default) but still table is not hidden from admin. any solution please?a small script

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2020 02:07 AM
Hey Krishna,
there is already answer available on community so please refer this link this might help
If the above code helps then please mark my answer Correct and Helpful.
Thanks and Regards:
Siddhnath Pandey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2020 02:22 AM
Admin is having access to the custom table despite not adding to the role list.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2020 02:20 AM
Hi,
don't give anything in roles section; don't give anything in condition; just use advanced and script as below
answer = !gs.hasRole('admin');
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
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
04-23-2020 02:25 AM
If role is not mentioned so how would i maintain access to a particular user ?
I am trying to make sure that table has only one access but that is not admin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2020 03:35 AM
Hi Krishna,
but admin inherits all roles; you can give the required role you want if required as you want particular user role to view that table
so if user is admin -> roles section would be true as admin inherits; but script would return false so ACL fails which is correct and table is not accessible
so when user is not admin -> roles section will be true; script section will also give true so ACL passes which is correct table is accessible
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader