Make change template fields read only
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
7 hours ago
Hi everyone!
I have a requirement to make some fields in the Change property read-only.
I've already managed to do most of the work by including them in the "Standard Change Properties".
However, there are two fields that I'm having trouble with, even though they're in the property: risk and impact.
Does anyone have any idea what the problem might be?
thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
7 hours ago
It might be conflicting with another property that makes it mandatory, so mandatory and read-only cannot work together.
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/dratulgrover [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
6 hours ago
In the image you sent, the field marked as mandatory is [Risk and impact analysis].
In my case, they are two different fields: [risk] and [impact].
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
7 hours ago - last edited 7 hours ago
Hi @ThiagoPereiraRJ,
The "Read-only fields" property works by triggering an out-of-the-box (OOTB) Client Script called "Mark standard change fields readonly" If this isn't working, it is usually because:
The "Type" Field is Missing: The script relies on the type field (which must be set to "Standard") to trigger. If the type field is not present on your Change Request form layout, the script cannot identify the record as a Standard Change and fails to apply the read-only restriction.
If my response helped, please mark it as the accepted solution so others can benefit as well.
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
6 hours ago
Hi @M Iftikhar
The type field exists:
The script is working. I added some logs to it and it goes through the two fields but doesn't set them as mandatory. It works correctly for the other fields.
