How can i make incident fields read only if state is closed in Agent Workspace?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2022 02:30 AM
function onLoad() {
//Type appropriate comment here, and begin script below
var fields = g_form.getEditableFields();
alert(fields);
if(g_form.getValue("state",'closed')) {
for (var x = 0; x < fields.length; x++) {
g_form.setReadOnly(fields[x], true);
} } }
USED THIS SCRIPT | BUT NOT WORKING
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2022 09:47 PM
@kalakaramad_20 Please try with ACLs.
Create a incident.None write acl as below
Create a incident.* write acl as below
And in all other incident.None or incident.* write acls add condition state != closed
Please mark as correct answer if this solves your issue.
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2022 05:51 AM
Hey I did it with the help of Ui policy.
Thanks For your Support.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2022 05:53 AM
@kalakaramad_20 Ok cool👍
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2022 06:07 AM
Yes With the help of ui policy it was possible for me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2022 06:14 AM
@kalakaramad_20 you can mark the relevant answer correct to close the thread.