- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 04:59 AM
Hi,
I have a Requirement like
if the User having admin Role then he/She can only able to see the Specific fields in the Preview the Record.
Can any one help me how can i achieve this .
Thanks in Advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 05:19 AM - edited 12-22-2022 05:20 AM
Hi @Ashok32 ,
Create a new view with name "sys_popup"
and configure form layout for that reference field table.
Then create view based client script / ui policy to hide or show the fields based on condition.
Reference :-
Hide field on open record preview
How to hide Variables from RITM Preview?
Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 06:11 AM
Hi @Ashok32
You can create UI policy or client script on view based.
Just uncheck globle checkbox from client script writedown view name as 'sys_popup'.
And then in script check role as below
If (g_user.hasRole('admin')) {
//Code
}