Make Assignment group and Assigned to Read Only When Logged in User Don't Have Specified Role.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2024 05:59 AM
Hi All,
How to Make Assignment group and Assigned to Read Only When Logged in User Don't Have admin or Incident manager Role.
This Task can be performed by Two ways :
- ACL field Level
- Client Script (onload)
Via ACL is Working Fine, but when I am trying via Client Script is Not Working.
for knowledge purpose I am trying this Client Script but it is not Working.
Client Script Code:
function onLoad() {
//Type appropriate comment here, and begin script below
var isAdmin= g_user.hasRole('admin');
var isIncidentManager= g_user.hasRole('incident_manager');
if(!isAdmin || !isIncidentManager){
alert('user do not have specified Role');
g_form.setReadOnly('assignment_group',true);
g_form.setReadOnly('assigned_to',true);
}
}
Thanks in Advance !!!
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2024 08:45 PM
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2024 05:48 AM
Hi @satishyelmule
Can you share the script that you have written in UI Policy script.
Regards,
Najmuddin.