How to add custom fields to Incident's Activity Formatter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2020 06:31 AM
Hello,
I would like to add custom fields to the Filter Activity in the incident form, but I couldn't manage how so far. More specifically, I have a private attachment table and all attachments which are marked as "private" should still be visible in the activity form.
As of now, when an attachment is marked as private, a BR changes the associated table from "incident" to "u_private_attachment", and then the said attachment is hidden from the activity. I would like to add "u_private_attachment" to the Activity Filter, so the attachment could still be visible.
I've found that the "glide.ui.incident_activity.fields" system property is responsible for the fields, and I see that, apart from the fields, entire tables are added this way -> *Email*,*Relations*,*Attachments*. However, I do not know how they are referenced. How can I add the private attachments to the above system property, and will this be the solution to the case?
Here is some similar post, but there is no information about how she added the private attachment to the activity form: https://community.servicenow.com/community?id=community_question&sys_id=2b6038d0db6c13802b6dfb651f96...
Sys_attachment table after a file was changed to private:
Attachment formatter on the Incident form:
Only the public file is shown:
How can I add the "u_private_attachments" table the same way "Attachments" is added to the Activity filter?
Big thanks in advance!
Martin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2020 07:07 AM
Hi,
Did you create your private attachment table as an extension of the original table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2020 11:14 PM
No, I'm not extending any table. Also, if by "original table" you mean "sys_attachment", the last is not extensible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2020 03:27 AM
I've tried to extend the sys_attachment table, but then, whenever you I create a record in the child table (u_private_attachment), the same is also visible in the parent table, so it is no longer "private". There should be a way to add the u_private_attachment table to the "available fields" like in my last screenshot.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2020 05:34 AM
Martin,
Yes that was the intent. Now if you place a business rule "on query" or better an ACL if it does the job on sys_attachment table based on the sys_class field, you may get the result you expected.