How do I include attachments when I publish my app to the Application Repository?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2025 08:55 AM
I'm having trouble including attachments in my application. So for example, I want to use a .ico file in my UI Page. I add it as an attachment and then set up my code like below with its sys_id. This works great in my dev instance.
<head>
<link rel="shortcut icon" href="/sys_attachment.do?sys_id=abcdefghijk1234567890dedcfe16d4313"></link>
</head>
I then go to sys_attachment and make sure the file is added to my application files.
The trouble is, when I then publish to the App Repository and install on a new instance, the file size is then 0 bytes.
I then found out this is due to the way attachments store their data inside sys_attachment_doc. The problem I have is that I can't add the records inside sys_attachment_doc into my application files, the opion to Create Application File is not available.
So what is the correct way to achieve this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2025 09:17 AM
If you are not able to add the sys_attachment_doc then it's not possible.
When you publish the app you can provide a separate image file along with that which customers can download and have manual activity to update the sysId
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2025 09:22 AM
@Ankur Bawiskar
Is that normal for a service now application to have the user install additional files? It doesn't seem very user friendly?
Cheers,
Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2025 09:26 AM
there are some limitations when you publish app.
I have worked with something similar and we did share separate update set which was in global scope to our customers and inform the manual steps to perform as part of installation guide and design document.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2025 07:23 PM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader