How to make a field readonly when certain field value changes from the oldvalue ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2025 12:52 AM
Need to make a field readonly when the value changes for the first time to avoid multiple changes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2025 12:58 AM
Hi @ABHI08
You need combination, server side with client side
1 - Business Rule (Server-side)
Create a Business Rule to detect first-time change:
- Table: your target table (e.g., incident)
- When: before
- Update: (checked)
- Condition: Leave blank or add any condition you want
if (!current.u_priority_changed && current.priority.changes()) {
current.u_priority_changed = true;
}
2 - UI Policy to Make Field Read-Only (Client Side)
Create a UI Policy to make the short_description (example field) read-only when the flag is true:
- Table: your target table (e.g., incident)
- Conditions:
- u_priority_changed is true
- In the UI Policy Actions:
- Field: short_description
- Read-only: (checked)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2025 01:13 AM
What's your actual business requirement here?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
@Ankur Bawiskar I want to make a field read only after after the field value have been changed once. The read-only part is only to avoid any further changes to the field value after the 1st time change
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
1st time change for new record or existing record?
What's your actual business requirement?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader