Make field readonly using UI Action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2025 08:47 AM
Hi Community,
I’m trying to add a button on the Incident table form that, when clicked, should make the State and Short Description fields read-only. Could anyone guide me on how to achieve this?
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2025 08:49 AM
Hi @DevYadav
Is there any specific reason to implement this using a UI Action? It might be better to handle it via a UI Policy, based on the state and other parameters."
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2025 08:51 AM
Thank you for the response. However, the requirement is that both fields should become read-only only when the button is clicked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2025 08:54 AM
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2025 08:54 AM
Adding a button for this is overkill and not aligned with best practices in ServiceNow. You don’t need a button to control field visibility or read-only behavior—this is exactly what UI Policies are for. Buttons should be used for actions (like triggering scripts or flows), not for simple client-side UI manipulations.
-
Navigate to:
System UI > UI Policies
(Table:Incident [incident]
) -
Click “New” and configure:
-
Name: Make State and Short Description Read-Only
-
Table: Incident
-
Conditions:
Set the condition that should trigger the read-only behavior.
(Example: State is “Resolved” or Assignment Group is “Network” — whatever your use case is.)
-
-
Check:
Reverse if false (optional—if you want the fields to go back to editable when the condition no longer applies) -
Save the UI Policy.
-
Under the UI Policy record, go to the UI Policy Actions related list:
-
Click New for each field you want to affect:
-
Field name:
State
Make Read-Only: True -
Field name:
Short Description
Make Read-Only: True
-
-
-
Save everything.