- 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 06:46 AM
Using this I am able to execute the next line , but I have a doubt if there are multiple attachments for incident table then what value it will return
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2023 06:17 AM
what is the type of business rule which u using?
getAttachment() returns the file name only eg-your attachment name is abc.txt or test.pdf etc
You
Do you want to send link to download the attachment.
If my answer solved your issue, please mark my answer as ✅Correct & 👍Helpful based on the Impact
Thanks,
Manjusha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2023 06:34 AM
I will be getting a response from 3rd party by executing the line 19. I want that response body
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2023 05:30 AM
In business rule ,
line 4 , I think you need to get "table_sys_id" instead of "sys_id"
var attachmentSysId = current.table_sys_id;
Hope this will work...!!
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2023 06:10 AM
This is not working