I want to make fields read only in change request and make editable by some specific groups
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2025 11:57 PM
we want to make description and short description read only in change request form and make editable by only some of the groups when change moves to Implement state.
What is the best way to implement it ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2025 12:04 AM
Hi @vivek11
Since you want to make it editable for only a few groups under specific conditions, you can use an ACL. However, I wouldn’t recommend it for this requirement. It’s better to either make it editable for everyone or for no one. If you want it to be editable for all, using a UI Policy is the best approach; otherwise, use an ACL or Before BR as well.
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
03-24-2025 12:05 AM
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
03-24-2025 12:18 AM
you can use field level WRITE ACL
Something like this, add for both the fields
answer = gs.getUser().isMemberOf('Group ABC');
OR
You can use Display business rule and onLoad client script
Display Business rule:
(function executeRule(current, previous /*null when async*/ ) {
if (current.state.toString() == '-1' && gs.getUser().isMemberOf('Group ABC')) {
g_scratchpad.canEdit = 'true';
} else {
g_scratchpad.canEdit = 'false';
}
})(current, previous);
onLoad client script:
function onLoad() {
// Check the g_scratchpad variable set by the Display Business Rule
if (g_scratchpad.canEdit == 'false') {
// Make the Description and Short Description fields read-only
g_form.setReadOnly('description', true);
g_form.setReadOnly('short_description', true);
}
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2025 12:26 AM
Hi @vivek11,
Best way to achieve your requirements would be Write ACLs for both short description and description. You can provide a script as follow:
answer = gs.getUser().isMemberOf('YOUR_GROUP_SYS_ID/GROUP_NAME');
If you found this helpful, please hit the thumbs-up button and mark as correct. That helps others find their solutions.