- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2024 07:49 AM
I would like to set the requested for field to read only if the current user is not a member of a specific group. Or does not have a specific role
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2024 07:58 AM
Hi @DreDay3000,
Write client script on that table like below.
you can use g_user.hasRole('itil'); for checking any role ... replace the itil with desire role.
function onLoad() {
var usr = g_user.getUserID();
// set the correct grouop name
if (!usr.isMemberOf('<group>')){
g_form.setReadOnly("requested_for",true)
}
-Thanks,
AshishKM
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2024 07:58 AM
Hi @DreDay3000,
Write client script on that table like below.
you can use g_user.hasRole('itil'); for checking any role ... replace the itil with desire role.
function onLoad() {
var usr = g_user.getUserID();
// set the correct grouop name
if (!usr.isMemberOf('<group>')){
g_form.setReadOnly("requested_for",true)
}
-Thanks,
AshishKM
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution