The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Attachment corrupted?

bonsai
Mega Sage

I attached a file to a record
but for some reason it wasn't displayed.

When I checked the attachment table I found that a record had been created with the "Name", "Content Type", "Table Name" and "Size (bytes)" fields left blank (Null).
The "Table Sysid" field was set to the sys_id of the record to which the attachment was made.

I don't know why this is happening...
Can attachments be damaged when attached?

4 REPLIES 4

Hemanth M1
Giga Sage
Giga Sage

Hi @bonsai ,

 

is it happening for all the attachments for that record? or only  with specific attchment

 

Do have any logic written on the attachmet table on insert??

 

 

Accept and hit Helpful if it helps.

Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025

This is not occurring with any specific file or situation.

Uploading the same file again processed it successfully.
The following file upload errors have occurred:

 

org.mozilla.javascript.EvaluatorException: GlideRecord.setTableName - empty table name (sys_script_include.2a2e54780a0a0b0500957d4debce8ed6.script; line 22)
   EvaluatorException(JavaScript evaluation error on:
var att = new Attachment();
att.setRecord(current);
if (att.isIndexed()) {
   var key = current.table_name + '-' + current.table_sys_id + '-' + current.sys_id;
   gs.eventQueue("text_index.attachment", null, current.operation(), key, "text_index");
}
)

This is the system log.

Hi @bonsai ,

 

This is the out of box script include to process attachment sys_id is "2a2e54780a0a0b0500957d4debce8ed6"  name : "Attachment", check any logic has been chaged or updated??

 

 

Accept and hit Helpful if it helps.

Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025

This script has not been modified