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

Peter Bodelier
Giga Sage

Hi @surbhi_123,

I don't think you wll get results in the next, so you are not going into the if statement.

I guess you are not attaching attachments to attachments, so in line 8 replace sys_attachment by the table you are attaching your attachments in.

 

See documentation for more detail.

And for the record... wow that is a lot of attaching... 🙂


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

You mean to say I should add the table sys id instead of sys_id?

No the table you are attaching the attachments in. So for example incident, or change_request


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

If I have to add attachment on incident table, I should give the sys id of incident table?

But there can be muktiple attachments on inicdent table so how will it get the attachmet I have added to the table?