How to add custom fields to Incident's Activity Formatter

Martin Pavlov
Tera Expert

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:

find_real_file.png

 

Attachment formatter on the Incident form:

find_real_file.png

 

Only the public file is shown:

find_real_file.png

 

How can I add the "u_private_attachments" table the same way "Attachments" is added to the Activity filter?

find_real_file.png

 

Big thanks in advance!

Martin

6 REPLIES 6

Syvo
Mega Guru

Hi,

Did you create your private attachment table as an extension of the original table?

No, I'm not extending any table. Also, if by "original table" you mean "sys_attachment", the last is not extensible.

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.

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.