How to make only a set of fields editable and the rest of the fields as readonly using a script in ACL?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2020 09:10 AM
Hello,
We have a requirement to make a set of fields editable on the CI form(s) and the rest of the fields as readonly for the CI owners. We are trying to achieve this using ACLs. We don't want to create multiple ACLs as we need to make at least 10-15 fields editable and rest of the fields as read-only. Any idea on how this can be implemented? Is there a way we can create only one ACL and use the advanced option and create a script to see if the logged-in user is the owner or not and then script can restrict the fields (editable vs readonly)? Any thoughts? Thanks in advance.
Regards,
mnreddy.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2020 09:27 AM
Hi,
In case you need to go with ACLs (recommended) then you need to make it per field level so in shor 15 will have 15 different ACLs.
Since, it has multiple fields you can also look for a onLoad() client script approach that checks for user's role & then make the field readonly/editable thereby ensuring 1 script does the job for you but this is not a recommeded approach.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2020 09:46 AM
Thanks for your response Jaspal. Like you mentioned, creating an onload()client script or display business rule is not a recommended solutions as it will have impact on the system performance, especially considering huge CI data. We are looking for a workaround to avoid multiple ACLs creation.
Regards,
mnreddy.