How field read only based on Roles.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2022 12:03 AM
Hi All,
User whoever having a role ( uis_srvacc_exception_admin ) they only can able to edit field ( SrvAcc Exc Details ) even Admin role user also shoud not able to editible, for that we have field level write ACL to edit the field and below is the script.
if (gs.hasRole('uis_srvacc_exception_admin') && !gs.hasRole('admin')) {
answer = true;
}
else {
answer = false;
}
Above script was not working for all the scenarios, for example If the user having only ('uis_srvacc_exception_admin') role its works and filed are editable.
But if the user have both roles ( ADMI role and also "uis_srvacc_exception_admin) in this scenario field not editable for who ever having the uis_srvacc_exception_admin role.
It should work even if Admin users if user has the ''uis_srvacc_exception_adminrole. Without this role it should not work.
Please sugeest.
Thanks all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2022 12:16 AM
1. Make your ACL admin override true and below changes to script:
if (gs.hasRoleExactly('uis_srvacc_exception_admin')) {
answer = true;
}
else {
answer = false;
}
Raghav
MVP 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2022 12:51 AM
Hi Raghav,
I have impliment above your code and chacked the admin over ride,But field did not editble if the user having uis_srvacc_exception_admin role.
Please suggest.
Thanks,
Varma