
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2020 03:12 AM
Hi All,
I wrote a UI policy to make all fields read-only when the problem state is completed. But while changing the state only all fields are getting read-only. As per the requirement after saving the form fields should become read-only. Please help me with this.
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2020 10:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2020 05:23 AM
Hi Anil,
You need to create a Write ACL on the table and give the condition "State is Completed" and roles "Nobody".
Please mark Correct/Helpful if this answers your question.
Thanks,
Prasanna Posetty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2020 09:43 AM
Hi Anil,
Any update on this?
Can you mark answer as ✅ correct, 👍 helpful if you were able to achieve the requirement. This enables other members to learn from this thread.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2020 09:50 AM
Hi there,
Instead of using UI Policy, have a look at these 2 out-of-the-box ACL's:
One is for the ITIL role, the other for sn_problem_write role. They both contain below code:
answer = true;
if (pm.isActive('com.snc.best_practice.problem.madrid.state_model')) {
if (current.state == ProblemState.STATES.CLOSED)
answer = false;
}
So if you have the plugin mentioned activated, then already the records should get read-only / no write access when a closed state is reached.
If you do not have the plugin mentioned activated, you have to edit these ACL's. You could already do this with the available condition builder. Simply adding state | is not one off | your closed states, or active | = | true.
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field