- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
When state is Resolved, it should make all the fields read only on Incident form.
I tried UI Policy - but it is making only few fields read-only.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
I will recommend to use ACL approach and not client script. If you use client script users can still edit from list.
OOTB there is 1 Table.None WRITE ACL which allows updating only when State [IS NOT] Closed
-> https://instanceName.service-now.com/nav_to.do?uri=sys_security_acl.do?sys_id=66ec26370a0a0b0100a67b597d415b84
Update the condition as this
State [IS NOT ONE OF] Closed, Resolved
-> There is 1 other ACL which allows updating INC if you opened it or you are caller
https://instanceName.service-now.com/nav_to.do?uri=sys_security_acl.do?sys_id=66ecaf4d0a0a0b010029ce5027a8d56f
Update condition as this
Incident State [IS NOT ONE OF] Closed, Resolved
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
@Pratiksha KC Hi tried onload script?
function onLoad() {
if (g_form.getValue('state') == '6') {
readOnly();
}
}
function readOnly() {
var fields = g_form.getEditableFields();
for (var i = 0; i < fields.length; i++) {
g_form.setReadOnly(fields[i], true);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @Pratiksha KC ,
create an ACL like this
since no one is supposed to edit don't give any roles
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hello @Pratiksha KC ,
You should cover this using UI Policy is the proper and correct way, I don't understand why only 'few' fields are read only, add all you need (fields) as a Policy action.
You can achieve this using client script onChange on state field, but I strongly recommend use UI Policy
☆ Community Rising Star 22, 23 & 24 ☆
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
I will recommend to use ACL approach and not client script. If you use client script users can still edit from list.
OOTB there is 1 Table.None WRITE ACL which allows updating only when State [IS NOT] Closed
-> https://instanceName.service-now.com/nav_to.do?uri=sys_security_acl.do?sys_id=66ec26370a0a0b0100a67b597d415b84
Update the condition as this
State [IS NOT ONE OF] Closed, Resolved
-> There is 1 other ACL which allows updating INC if you opened it or you are caller
https://instanceName.service-now.com/nav_to.do?uri=sys_security_acl.do?sys_id=66ecaf4d0a0a0b010029ce5027a8d56f
Update condition as this
Incident State [IS NOT ONE OF] Closed, Resolved
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
