ARTICLE - Custom Attachment Visibility Before Upload (UI16)

arorsu1
Tera Contributor

Hi everyone 👋

 

I had a requirement where users need to choose the visibility of attachment(s) before uploading them.

 

Requirement

When a user uploads attachment(s) from a record (e.g., Catalog Task):

  • Ask the user who should see the attachment(s)

  • Based on the selection:

    • Internal

      • Attach to the current record (e.g., SCTASK)

      • Visible to technical team members only

    • External

      • Attach to the parent RITM

      • Visible to the requester / end user

So essentially, we want to control where the attachment is inserted and therefore who can see it.

 

Why Not Native Attachment Button?

Out-of-the-box attachment button:

  • Immediately uploads to the current record

  • No way to intercept and ask for visibility before insert

So we had to override the behavior.

 

Project: https://developer.servicenow.com/connect.do#!/share/contents/9890958_custom_attachment_visibility_be...

2 REPLIES 2

Adrian Ubeda
Mega Sage

Hello @arorsu1 ,

For accomplishing this requirement you'll need to create some custom UI Page and customize as needed (https://www.servicenow.com/community/servicenow-ai-platform-blog/create-a-custom-attachment-button-f...) inside the ui Page you'll need to create the choice selection and add the logic needed (https://www.servicenow.com/community/itsm-forum/how-to-create-quot-choice-quot-field-on-quot-ui-page...)

I let you some useful resources for this

If it was helpful, please give positive feedback! ✔
☆ Community Rising Star 22, 23 & 24 ☆

Thanks. Already implemented this — just sharing the requirement and the approach we took to solve it.