- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2024 02:28 AM
I want if the logged-in user is an admin then the 'closed' choice in the 'state' field of the incident form should not be visible.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2024 02:32 AM - edited ‎03-15-2024 02:32 AM
Hi,
Try the below in an onload client script (keep the ui type as all)
if (g_user.hasRole('admin')) {
g_form.removeOption('state', '3'); // valiue for closed, chjange the value if you have somehting different
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2024 02:45 AM
Hi,
There are two option to achieve this.
1) UI Policy
2) Client script
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2024 02:32 AM - edited ‎03-15-2024 02:32 AM
Hi,
Try the below in an onload client script (keep the ui type as all)
if (g_user.hasRole('admin')) {
g_form.removeOption('state', '3'); // valiue for closed, chjange the value if you have somehting different
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2024 02:45 AM
Hi,
There are two option to achieve this.
1) UI Policy
2) Client script
Thanks.