How to upload a document in Servicenow

shaik_irfan
Tera Guru

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 ?

 

7 REPLIES 7

Hi Irfan,

 

Is there any specific need to do it via script as the record when inserted in sys_attachment table need to have table_sys_id(Record where it is to be used/attached).

What is the purpose of getting it uploaded via script in sys_attachment table? Would you mind elaborating a bit about it?

Hitoshi Ozawa
Giga Sage
Giga Sage

Will need to use a script to upload a file directly to sys_attachment table.

There's a sample code in the thread below. You'll need to base64Encode() binary files.

https://community.servicenow.com/community?id=community_question&sys_id=f47fbaa9db58dbc01dcaf3231f96...

 

Another way to add an attachment is by accepting inbound email with attachment.

https://community.servicenow.com/community?id=community_question&sys_id=898607c4db666b40d6a102d5ca96...

Flow Designer has a step to copy attachment too.

Megha Padale
Giga Guru

Hi Irfan,

Check this similar thread, it might help you

https://community.servicenow.com/community?id=community_question&sys_id=a0e38fa5dbd8dbc01dcaf3231f96...

If my answer helped you in any way, mark answer as helpful and correct.

Thanks and regards,

Megha