Errors are showing when in a variable attachment type we add an excel file

SnehaSaran15
Tera Contributor

We have made a custom catalog item as Bulk Onboarding and when we are attaching an excel file in the attachment type variable then we are getting following errors.

 

Th errors are coming from BRs running on attachment table but tablename has been explicitly mentioned in condition  which is not sc_req_item table. In these BRs there are script includes being called in advanced script and condition section.

@Ankur Bawiskar @Mark Roethof  Please help.

 

Please find screenshot attached.

2 REPLIES 2

Ahmmed Ali
Mega Sage

Hello @SnehaSaran15 

 

Couple of inputs which might be helpful:

 

1. I guess you are wring GlideRecord on attachment table_name value in your attachment BR/SI. But for the attachment type variables, whenever an attachment is attached, system prefixes ZZ_YY to the table name. 

Example: when you attach the attachment in variable in port (before submitting the form), table name will be ZZ_YYsc_cart_item, and once submitted, table name will be updated with target name, example ZZ_YYsc_req_item, ZZ_YYincident etc.

 

2. This prefix is added so that the attachments with this prefix will not be shown in attachments section (after header) in form view.

 

3. If you write GlideRecord() on this attachment record's table_name field value, you will receive error stating invalid table, as shown in your screenshot.

 

You will have to look at your script and modify it accordingly.

 

Thank you,

Ali

 

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

Hi Ahmmed,

 

We are using GlideRecod to compare sys_id

var CaseRec = new GlideRecord(tableName);
CaseRec.addQuery("sys_id", String(curObj.table_sys_id));
CaseRec.query();

Could you let me know the alternative for it in GlideAggregate or any other alternative to perform same action as above code.