Best Practice for making fields read only while closing any task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2019 05:04 AM
Hi All,
I need your inputs to fulfill a simple requirement using the best practice. We need to make all the fields on a form (can be incident/problem/change or incident task/problem task/change task) read-only once the state of the form is closed.
For this we have a UI policy created, where the condition is state is Closed and in UI policy actions we have given the required fields to set read-only and this works as expected.
Now, the customer is saying that as soon as he selects the state from the drop-down as Closed, fields become read-only. This I think is the expected behavior of UI policy. But the customer doesnt want it this way, they are saying that it should become read-only after we save the form, because in case if they select Closed and realize they forgot to update any field. We informed them that they can reload the form and update the field.
So I wanted to know if UI policy is a best practice or can we achieve this in any other way?
Thanks,
Prajakta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2019 05:23 AM
Thanks for your reply, but do you think using ACL is best practice for making fields read-only? If there is more than one field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2019 05:29 AM
Yes it depends on the use case.
If you are looking for a complete lockout upon closure then definitely ACL is the best practice (check incident OOB ACLs)
Based on your requirement, Why dont your mark the required fields as mandatory before closure? In your case user would never miss any important fields before closure. This is the first thing I would check. Now if you cannot keep it mandatory, you could definitely add some info messages or annotations on the form to say following fields are required for closure.
If you could get an agreement with customer and you need to lockout fields after closure then ACL is the path i would suggest.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2019 05:39 AM
thanks.
can write if state is NOT closed and state is NOT canceled
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2019 06:10 AM
Definitely agree with Alikutty the ACL is best practice here.
You could use a UI policy or a data policy but you'd have to add a policy action for every field to set them all read only, it's much easier just to restrict write access to tickets not in the closed state.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2019 06:07 AM
Hi Prajakta,
To make field level security you could use ACL , UI Policy , client script or data policy.
Best way to do is UI Policy if its not possible with that then go to client script.
In this case, ACL.
Why?
- It will apply everywhere, every time.
- The security logic is done server side. More efficient
- Less UI Policy = less javascript = smaller page size = faster load time.
Regards,
Sanket