add a record to sys_attachment table

nikitathomas
Kilo Explorer

Hi,

How do I add a record to the sys_attachment table?

Thanks,

Nikita

3 REPLIES 3

Michael Ritchie
ServiceNow Employee
ServiceNow Employee

That table is used to store attachments for records in ServiceNow. If you attach a file to say an incident it will be stored there along with a pointer back to the incident table and the sys_id of the incident.



Please provide more detail on your question if the above explanation doesn't make sense.  



srinivasthelu
Tera Guru

Hi Nikita,



Basically ServiceNow stores attachment metadata information in sys_attachment table. Actually data of the attachment is chunked and stored in sys_attachment_doc table. I would suggest you to use OOB methods to create attachments than creating direct records.



You might find below thread useful.



AttachmentCreator SOAP Web Service - ServiceNow Wiki



Thanks


Srinivas


Hi Srinivas,



Agree with your point but want to know how below records got created under attachment table as there is no New button, so if we also would like to add any record like text/pdf/ppt in attachment table as sys_attachment. How to do that ?



find_real_file.png