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

elloAttachment not visible in a record

hadron_collider
Tera Contributor

Hello,

 

 

I have an issue with displaying the attachment from a request that was submitted from a multiple-row variable set catalog item.

 

 

As you can see the attachment has been added:

kata90_1-1704802604312.png

 

however, when I preview the created record I do not see this attachment:

 

kata90_3-1704802752517.png

 

 

Here is the expected result:

 

kata90_2-1704802707198.png

 

1 REPLY 1

Brad Bowman
Kilo Patron
Kilo Patron

When using the attachment type variable, the attachment appears in the Activity Stream on the record, not at the top as when using the paper clip icon.  I assume this is the same when the variable is within a MRVS, but haven't tested this.  To get the attachment to appear at the top of the record you can create an Async After Insert Business Rule on the record producer table:

(function executeRule(current, previous /*null when async*/) {

	var gr = new GlideRecord("sys_attachment");
	gr.addQuery("table_name", "ZZ_YY" + current.getTableName());
	gr.addQuery("table_sys_id", current.sys_id);
	gr.query();
	if (gr.next()) {
		gr.table_name = current.getTableName();
		gr.update();
		new global.VariableUtil().copy(gr.sys_id, current.getTableName(), current.sys_id); 
	}

})(current, previous);