attachment restrict to a particular user in a table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 08:50 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 09:00 PM
Hi @jishnu_36
You can write an access control on attachments table for this type of requirements.
Please appreciate the efforts of community contributors by marking the appropriate response as the correct answer and helpful. This may help other community users to follow the correct solution in the future.
********************************************************************************************************
Cheers,
Prashant Kumar
ServiceNow Technical Architect
Community Profile LinkedIn YouTube Medium TopMate
********************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 09:15 PM
can you pls explain in detail like I'm trying to create acl as well but my requirement was particular user can only access the manage attachment . pls can you have a look my query.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2024 11:04 PM
can any one explain with script include and my actual requirement was hide the manage attachment button on form for all users expect assigned to users its able to visible
thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2024 11:51 PM - edited 01-29-2024 11:53 PM
Hi @jishnu_36
You can create a read acl on the sys_attachment table and in conditions add the table name. write the script below
var recgr = new GlideRecord('table_name');
recgr.get(current.table_sys_id);
if(recgr.assigned_to == gs.getUserID())
return true;
else
return false;
if there are other read acl on sys_attachment table then in each of them you have add a condition that table name is not the table you want to apply the above acl
Regards,
Piyush Sain