Limit access to the "preview this record" button by roles

RimaJ
Tera Contributor

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.

capture_1.PNG

5 REPLIES 5

shyamkumar VK
Kilo Patron

@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

 

Please mark this as helpful and accept as a solution if this resolves your Ask.
Regards,

Shyamkumar

Sohithanjan G
Kilo Sage
Kilo Sage

Hi @RimaJ , 

 

Directly you cannot limit the access by roles. That cannot be possible. So as a workaround you can perform these below steps. 

  1. Create a new View for reference icon pop up. Link 
  2. Add the view rule based upon the popup view Link

🙂

Please mark as Accepted Solution if this solves your query and HIT Helpful if you find my answer helped you. This will help other community mates too..:)

Dr Atul G- LNG
Tera Patron
Tera Patron

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]

****************************************************************************************************************

Sumanth16
Kilo Patron

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