Related to ITSM ACL
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2023 02:25 AM
How can we achieve this ?
Besides the assignment group and admin, all fields should be read-only for other group members, except worknotes Field values should also not change from the List Layout |
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2023 04:15 AM
can you try to implement this using BR -
(function executeRule(current, previous /null when async/) {
// Get the current user's group.
var currentUserGroup = current.gs.getUser().getRecord().group;
// Check if the current user is in the assignment group or admin group.
if (currentUserGroup == "Assignment Group" || currentUserGroup == "Admin Group") {
// The current user is in the assignment group or admin group, so allow them to edit the fields.
return;
}
// The current user is not in the assignment group or admin group, so set the read-only attribute on the fields and prevent field values from changing from the List Layout.
current.setReadOnly(true);
current.setReadOnlyFromListLayout(true);
})(current, previous /null when async/);
Please, don't forget to mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!
Regards,
Tushar