Make all fields readonly when state s changed to closed including work notes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
I want to make all the fields read only including work notes on hr case form when state is change to closed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Put a deny-unless write ACL on the table with active = true as condition. Deny-Unless ACLs are evaluated first. If the case isn't active, nobody can write to any field on the table.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
please use approach mentioned by @Mark Manders
Do let us know if any further help required
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
30m ago - last edited 29m ago
Hi @Priyanka_77
To make all fields—including work notes and additional comments—read-only on the HR Case form when the state changes to Closed, use a combination of an ACL and a UI Policy or try with only ACL
1. To ensure that users cannot bypass these UI scripts (such as via list editing or REST APIs), create a Write ACL
Navigate to System Security > Access Control (ACL) and click New.
• Type: record
• Operation: write
• Name: HR Case [sn_hr_core_case] and select None (for table-level) or * (wildcard) to lock all fields.
• Requires role: Select roles authorized to edit active cases
• Condition: Add State is not one of Closed Complete, Closed Incomplete, Closed Rejected, Canceled (adjust according to your HR configuration).
2. Create a UI Policy
Use a UI Policy to prevent edits upon form load
• Table: HR Case (sn_hr_core_case)
• Conditions: State is Closed //update condition as per your requirement
• UI Policy Actions:
o Select Leave unchecked for Reverse if false.
o Add the Work notes and Comments (Additional Comments) fields with other field as per your requirement and set their Read-only status to True.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti