Hide the catalog items fields from enduser
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-14-2023 12:14 AM
I want to hide catalog items fields from enduser can give me the code for this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-14-2023 12:43 AM
A user who doesn't have any role
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-14-2023 12:51 AM - edited ‎12-14-2023 12:54 AM
Hi,
You can write a onLoad client script as below
function onLoad() {
//Type appropriate comment here, and begin script below
var rr=g_user.getRoles()
if(rr.length==0)
{
g_form.removeOption("subcategory",'option1');
g_form.removeOption("subcategory",'option2');
}
}
GlideForm | ServiceNow Developers
Thanks and Regards,
Saurabh Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-14-2023 01:23 AM
I have tried it is not working and one more thing is my subcategory options are in choice table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-14-2023 01:31 AM
Hi,
Can you please alert the rr variable?
Thanks and Regards,
Saurabh Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-14-2023 01:32 AM
I didn't understood