Has anyone used the state field on Attachments to limit Access to the attachment?

Stacy1
Mega Guru

I can't find anything in documentation showing what the different states on the attachment table are for.

We want to limit show can see particular attachments and I am hoping to use the state field to determine that.

Didn't know if anyone knows how the states work?

Thanks,

Stacy

1 ACCEPTED SOLUTION

Stacy1
Mega Guru

So what I have learned is you can use the state 'not available' to prevent user's from downloading the file.

It will appear greyed out on the top attachment list and if they try to download it from the related list of attachments.  The file will simply say 'file not available'.

In case anyone was wondering how it worked.

Thanks,

Stacy

View solution in original post

8 REPLIES 8

sachinbhasin11
Tera Guru
Tera Guru

Hi Stacy, there isn't a state for attachment records. All attachments are hosted in sys_attachment table and don't have a state attribute with them

There are several ways to restrict attachment, I would recommend you can create read ACLs on sys_attachment table to do it based on your requirements

You can also refer to this article

https://community.servicenow.com/community?id=community_question&sys_id=6108436ddb1cdbc01dcaf3231f961984

 

For restricting attachments via roles, groups using system properties:

https://hi.service-now.com/kb_view.do?sysparm_article=KB0718577

 

Gaurav Shirsat
Mega Sage

Hi Stacy

There is No state for Attachments.

The Attachment Documents table also contains a reference field (sys_attachment), which points to the parent record in the Attachments table. This means that each attachment file will have one or more entries in the sys_attachment_doc table, which corresponds to the binary data of the original file that was attached.

Hi Gaurav,

There is a state on the sys_attachment table.

find_real_file.png

I do not see any ACL's or scripts specific to any of these states.  I am still curious if anyone uses them or know of any limitations based on these states.

 

Thanks,

Stacy

Mark Roethof
Tera Patron
Tera Patron

Hi Stacy,

Indeed, a state field exists. Don't know why the others are mentioning it doesn't.

find_real_file.png

Though your question... I have no clue!

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn