All incident form fields make read only with script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2024 10:44 PM
All incident form fields make read only with script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2024 07:38 AM
Please state a more clear business requirement - it's not clear based on your input.
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Best regards
Anders
If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.
Best regards
Anders
Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2024 07:50 AM
Solved: When incident is closed, what makes all the fields... - ServiceNow Community
There is an ACL that currently prevents ITIL users from editing closed incidents. Within this ACL, there is a condition that only allows editing if the incident state is not "closed" or "canceled." By removing this condition, ITIL users will be able to edit incidents even when they are closed.
ACL: https://your-instance.service-now.com/sys_security_acl.do?sys_id=66ec26370a0a0b0100a67b597d415b84&sysparm_view=&sysparm_domain=null&sysparm_domain_scope=null&sysparm_record_row=1&sysparm_record_rows=2&sysparm_record_list=operation%3dwrite%5ename%3dincident%5eORDERBYname
If this solution helps, please consider marking the answer as correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2024 07:59 AM
Hi @SrinivasS779136 Not sure what is your requirement. Below code will make all your form fields Read only.
You can create a Ui Policy to see if it makes all fields read only based on condition , otherwise you can write a Client script.
var fields = g_form.getEditableFields();
for (var x = 0; x < fields.length; x++) {
g_form.setReadOnly(fields[x], true);
}
