Script Include not working

surbhi_123
Tera Expert

I have a script include which is called from BR. It is not wrking from line 11. Before that I have put logs and the value is coming. But in lime 11 log value is not coming -

surbhi_123_0-1694002259984.png

The BR is written on attachment table as -

surbhi_123_1-1694002303647.png

Where is the code wrong in script include?

1 ACCEPTED SOLUTION

Please read the provided documentation:

ParametersName Type Description

tableNameStringName of the table to which the attachment belongs; for example, incident.
sys_idStringThe sys_id of record to which the attachment belongs.

Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.

View solution in original post

20 REPLIES 20

@surbhi_123 

 

What is your exact requirement?

Just check the fields on sys_attachment table,you will get the idea.

sys_attachment table contains table_name(eg-incident,sys_id of incident record) and file name 

 

Thanks Manjusha

I want to send the attachment added to incident table to 3rd party,

so should I replace the code as-

var gr = attachment.getAttachments('incident', attachmentSysId); ?

where attachmentSysId is sys id of attachment

No, use the sys_id of the incident the attachment was added to.

As @manjusha_ said, please look at the table view of the attachment table. It holds the same fields as you need to use. Hopefully that makes more sense.


Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.

I am not getting what should I write in the 1st and 2nd parameter?

surbhi_123_0-1694005781300.png

 

Table name, table sys id


Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.