Adding new button to attachment in side panel

PiotrŻ
Tera Contributor

Hi,

So, I have this issue: I want to add additional actions to the attachment menu in the sidebar (the one with the paperclip icon). I added it in the appropriate place (Attachment Actions). The "Mark as test" action is supposed to change the u_test field, which is in the attachment table, from false to true. I tried implementing this with a server script, and when the button is clicked, the field does indeed change. The problem arises with the conditional display of this button. In the server script, "current" correctly refers to the sys_attachment table, but in the Script Condition, "current" refers to the ticket record (e.g., an incident). I know that at the bottom, in the related list, there are Action Model Fields, including one called "attachmentSysId," which can be used in Client Conditions. I would need a field in these Action Model Fields that stores the value of u_test and, depending on that, hides or shows the specific button—either "Mark as test" or "Unmark as test." I spent a long time searching for where this is configured, but I couldn’t figure out how, for example, "attachmentSysId" is populated with a value. I wanted to do something similar for the u_test field, but I found nothing, even after reviewing most of the records where it might be populated.

0 REPLIES 0