How to upload a document in Servicenow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2020 08:27 AM
Hi,
I have a document which i want to save in attachment table. Just like how we can upload images to image table can we upload the documents in servicneow ?
- Labels:
-
Analytics and Reports
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2020 08:33 AM
You can use the paperclip icon to attach documents to the record. Unless I am misunderstanding the question.
You can also upload images to be used for other configuration purposes.
Navigate to System UI > Images to upload your images
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2020 08:37 AM
Thanks for the reply.
Sorry if i have confused you, i have a document that i need to upload in attachment table.
I know if we add to any record like incident or problem that will be added but we dont have a direct option to upload a document at attachment table ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2020 08:40 AM
Hi Irfan,
Try using below in background script for a check.
var insertattach=new GlideRecord('sys_attachment');
insertattach.initialize();
var gsa = new GlideSysAttachment();
var attachmentId = gsa.write(insertattach, "JaspalTest.txt", 'text/plain', "Data is here");
//JaspalTest-Filename .txt-is type
//Data is here is the content of the document
Try changing .txt to .doc & replace "Data is here" with the content of the word document
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2020 08:58 AM
I have a Excel template which is so big, i am confused how to include that in the background script