Configuring list view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2024 10:51 PM
How to make all fields in the list view of incident list read-only but the following fields should be editable by the itil role: short description, state, category, and assignment group.
I have made 2 access control rules:
- incident.short_description:
- incident.*
When incident.short_description is active and not the incident.*, it is working as expected. Any user without an itil role cannot edit the short description field in the list view cell, but as Beth Anglin with the itil role it can. But if i set incident.* as active, Beth Anglin cannot edit the short description in the list view anymore.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2024 05:50 AM
Hi @robbcmd1234 ,
I think this servicenow community question is similar to your question. This would help you in fixing the issue.
https://www.servicenow.com/community/developer-forum/quot-admin-overrides-quot-checkbox-not-working/...
To summarize,
gs.hasRole() checks whether the user has a specified role or the admin role. That is the reason it was not working. The above link provides you an alternative way to write the script in ACL script section that fulfills your requirement.