Hide "Preview this Record" button on the form (NATIVE SIDE)

SS40
Tera Expert

How to hide the "Preview this record" (i) icon for specific groups?

4 REPLIES 4

Community Alums
Not applicable

Hi @SS40 ,

 

You can remove that reference icon by adding this attribute to the field, just add if condition that if the group is xyz":

ref_decoration_disabled=true

However, this does it for more than just service portal.

Otherwise, see this thread for a service portal specific option: https://community.servicenow.com/community?id=community_question&sys_id=e02fc3e1dbdcdbc01dcaf3231f96...

How do I script/add conditions in the attribute field? So that users of the specific groups should not be able to view the (i) icon?

Ankur Bawiskar
Tera Patron
Tera Patron

@SS40 

you can just show it or hide it using field attribute.

To hide it based on group you need to use combination of Display BR + onLoad client script

onLoad client script will use DOM manipulation to hide but DOM is not recommended.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@SS40 

Thank you for marking my response as helpful.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader