- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 02:08 AM
Request to provide client script to fulfill the above story in change table. Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 04:33 AM
Hello @Sirisha Snow -
I noticed that you marked my answer as helpful.
So if resolves your query then please Accept my solution ✔️ as well and close the thread to help future readers to understand.
Thank You!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 02:13 AM
@Sirisha Snow You can achieve this either by creating a UI Policy or write ACL on your change table.
In case of UI Policy, simply check the state in condition builder. For ACL you can create a table and field level ACLs and check the state of the current record. if the state is closed then you can return false in the ACL script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 02:15 AM
You can try the UI policy or If i am not wrong it is OOTB.
On load client script
change the state value as per state.
if(g_form.getValue('state') == '3') //check closed complete backend value once
{
var fields = g_form.getEditableFields();
for (var x = 0; x < fields.length; x++) {
g_form.setReadOnly(fields[x], true);
}
}
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/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 02:15 AM
Hello @Sirisha Snow -
Please try below On-change client script on change request table if state changes:
if(newValue=='3'){
var fields = g_form.getEditableFields();
for (var x = 0; x < fields.length; x++) {
g_form.setReadOnly(fields[x], true);
}
}
Please Mark ✅Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.
Thanks,
Pratiksha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 02:17 AM
Hello @Sirisha Snow ,
You can use UI policy to make fields read only. Give condition state is closed.
Regards,
Rohini Sane