- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-28-2021 04:31 AM
Hello Experts,
Is there a way to restrict the attachment on RITM so that it is visible only to the requester and the assignment group
If possible can anybody help with the method or the script.
Solved! Go to Solution.
- Labels:
-
Request Management
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2021 12:43 AM
Hi,
Steps
1) Elevate your role to security_admin
2) Then create new Table level READ ACL on sys_attachment
3) Advanced checkbox true
4) Condition as table name -> sc_req_item
5) Script below
answer = checkCondition();
function checkCondition(){
var isRequestedFor = false;
var ritmSysId = current.table_sys_id;
var rec = new GlideRecord('sc_req_item');
rec.get(ritmSysId);
if(gs.getUserID() == rec.request.requested_for){
isRequestedFor = true;
}
var isMember = gs.getUser().isMemberOf('Group ABC');
return (isRequestedFor ||isMember) ? true : false;
}
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
‎01-29-2021 12:43 AM
Hi,
Steps
1) Elevate your role to security_admin
2) Then create new Table level READ ACL on sys_attachment
3) Advanced checkbox true
4) Condition as table name -> sc_req_item
5) Script below
answer = checkCondition();
function checkCondition(){
var isRequestedFor = false;
var ritmSysId = current.table_sys_id;
var rec = new GlideRecord('sc_req_item');
rec.get(ritmSysId);
if(gs.getUserID() == rec.request.requested_for){
isRequestedFor = true;
}
var isMember = gs.getUser().isMemberOf('Group ABC');
return (isRequestedFor ||isMember) ? true : false;
}
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
‎01-31-2021 07:43 AM
Hope you are doing good.
Did my reply answer your question?
If so, please mark appropriate response as correct & helpful so that the question will appear as resolved for others who may have a similar question in the future.
If not, please let us know if you need some more assistance.
Thanks!
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
‎02-16-2021 12:54 AM
Hope you are doing good.
Did my reply answer your question?
If so, please mark appropriate response as correct & helpful so that the question will appear as resolved for others who may have a similar question in the future.
Thanks!
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
‎12-20-2021 05:10 AM
Hi
please help me on this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2024 02:01 AM
Hi @Ankur Bawiskar , Is this working for you ?
It's not working for me when i replicating the same for me on incident table.