Make assignment field mandatory on the incident form after saving (SOW)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
once we select the assignment group and after saving the record in the incident form, the field needs to become read only in the service operations workspace. we can't change the assignment group. The below code is not giving the expected output
- Labels:
-
Workspace : Next Experience
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
what debugging did you do?
How we would know the issue unless you debug
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
The issue here isn’t really your logic, it’s that Service Operations Workspace doesn’t reliably honor traditional Client Scripts, so your onLoad script isn’t behaving as expected. The simplest and most reliable fix is to use a UI Policy instead. Create a UI Policy on the Incident table with the condition that the assignment group is not empty (and the record is not new), and set the assignment_group field to read-only. Most importantly, make sure the UI Policy is configured to apply to Workspace, otherwise it won’t work there. This approach avoids scripting issues and ensures that once the record is saved with an assignment group, the field becomes read-only and cannot be changed.
