How to make fields read only if logged in user is not part of assignment group in CI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2023 12:27 AM
Hello Experts,
In user table there is one field called cmdb this field type is select box as per now if logged in user cmdb=true then he can able to edit all the fields in all ci classes. if cmdb=false then he cannot edit all field will be read only.
now the requirement is
In any CI classes current logged in user is a part of support group and he is not part of assignment group and cmdb=true then we need make read only 2 fields (status and support group)
remaining fields need to be editable because cmdb=true.
note.
above change will not applicable for Admins and config admin roles
How to achieve this instead of ACLs.
Best Regards,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2023 01:58 AM
I would suggest to discuss this requirement with your customer as it will impact every CI class.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2023 02:11 AM
Hello @Ankur Bawiskar
I already had a discussion with my customer they agreed.
They really required 2 fields read only.
Best regards,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2023 02:37 AM
did you discuss this requirement with your technical team/architect?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2023 03:07 AM
Hello @Ankur Bawiskar
I will test it in my PDI if everything is working well then defiantly i will do the same changes in my real instance
Please share the onload client script . That will help to me
Best Regards,
Raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2023 02:51 AM
Having client side code to make it read only is not a good practice. Like Ankur said, please discuss with your Tech Lead to address this.
The best solution is to tackle this through an ACL only.
Thanks,
Dhruv