hide impact options when user have certain roles
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2024 12:20 AM
When a user is creating a new incident
record, if he does'nt have the
incident_impact_urgency_write role
remove high and medium impact options
onLoad Client Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2024 12:27 AM - edited 06-12-2024 12:33 AM
Hi @marrikruthi,
Please try this below code
function onLoad() {
// Check if user has the required role
if (!g_user.hasRole('incident_impact_urgency_write ') {
// Remove high and medium impact options
g_form.removeOption('impact', '1'); // High impact
g_form.removeOption('impact', '2'); // Medium impact
}
}
Please accept my solution if it resolves your issue and thumps 👍 up
Thanks
Jitendra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2024 06:56 AM
no it is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2024 08:15 AM
Hi could you please share your script.