Upload attachments from UI page

Lokesh5
Tera Contributor

Hi everyone,

I have a UI Page (attached below)where I would like to add an additional functionality to upload attachments. These attachments should be linked to the respective target record in ServiceNow. Could you please confirm if this can be achieved?

Looking forward to your insights.

Screenshot 2025-03-18 165135.png

 

3 REPLIES 3

Shivalika
Mega Sage

Hello @Lokesh5 

 

Yes, this can be done by creating an HTML input field of type "FILE". 

 

To access this file you will then need to convert it to base64encoded form - this is a method provided in GS object. Then you can use javascript to read the file and send it as attachment to specific target record. 

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway,

 

,

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY

 

 

 

Ankur Bawiskar
Tera Patron
Tera Patron

@Lokesh5 

you will have to use custom solution for this.

what's your business requirement for this?

Why not use OOB attachment paper-clip icon?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Shivalika
Mega Sage

Hello @Lokesh5 

 

Please confirm if you checked my answer. Kindly mark my answer as helpful and accept solution if it helped you in anyway, so that it can move from unsolved bucket to solved bucket. 

 

Regards, 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynL

cOwNeE