Options
- 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.
Regards,
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader