- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2023 05:12 AM
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 -
The BR is written on attachment table as -
Where is the code wrong in script include?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2023 05:53 AM
Please read the provided documentation:
ParametersName Type Description
tableName | String | Name of the table to which the attachment belongs; for example, incident. |
sys_id | String | The 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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2023 05:25 AM - edited ‎09-06-2023 05:26 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2023 05:45 AM
You mean to say I should add the table sys id instead of sys_id?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2023 05:47 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2023 05:51 AM
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?