Limit access to the "preview this record" button by roles
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2024 06:39 AM
Hello community,
I have been experiencing some difficulties with the "preview this record" button in records (please refer to the attachments). I would like to limit access to the button based on roles, making it either read-only for users or not visible.
Thank you for your assistance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2024 06:57 AM
@RimaJ , Add this into field Attribute , if you want to show this based on Role
ref_decoration_disabled=true
go to sys_ui_view.LIST & search with sys_popup and add requires roles over there if you want based on Roles
Regards,
Shyamkumar
Regards,
Shyamkumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2024 07:00 AM
Hi @RimaJ ,
Directly you cannot limit the access by roles. That cannot be possible. So as a workaround you can perform these below steps.
🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2024 07:02 AM
Hi @RimaJ
You can remove for everyone by adding the decorations attribute as false.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2024 07:09 AM
Hi @RimaJ ,
Please try with onload client script to check if user has required roles to hide the hover icon, please refer the sample code and link for more info:
function onLoad() {
//Type appropriate comment here, and begin script below
if(g_user.hasRoles('itil'))
$('view.incident.caller_id').hide();
}
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth Meda