- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2022 04:34 AM
Hi,
My requirement is to restrict work notes on the employee relations case for a particular group of users (Eg: ABC group). The work notes should be available for the user(ABC group user) during case creation but after the creation of the case, the user (ABC group user) should not be able to add any work notes.
I'm trying to achieve this using ACLs but not able to achieve it. Please help me in understanding where I'm going wrong.
Read ACL on the Employee relations case table, and on the work notes. Below is the script:
if(gs.getUser().isMemberOf('group sys_id') {
answer = false;
Thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2022 04:43 AM
Hi,
create field level WRITE ACL on that field for your table
Script:
answer = checkCondition();
function checkCondition(){
if(current.sys_created_by == '')
return true; // always show since it's for new record
else{
return !gs.getUser().isMemberOf('group sys_id');
}
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2022 04:43 AM
Hi,
create field level WRITE ACL on that field for your table
Script:
answer = checkCondition();
function checkCondition(){
if(current.sys_created_by == '')
return true; // always show since it's for new record
else{
return !gs.getUser().isMemberOf('group sys_id');
}
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2022 07:06 AM
Thank you Ankur, that worked.
Also if the user who is in that particular group (ABC group) has an 'admin' role to him then he should be able to add the work notes. How do I add this in the above code?