Help with a script

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2024 03:36 PM - edited 08-11-2024 03:37 PM
Hi all,
In the virtual agent, I have a script (see below) that shows a list of all invoices (see image).
I would like to give the ability to download those records if they need, how can I add the functionality to the below script? Thanks
Current list of invoices:
Current script:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2024 08:14 PM
@Community Alums
I believe the only way is to use HTML bot response where you can show the columns you want and in 1 column have link to that record so that they can download it as pdf or excel etc
something like this you can give in the anchor tag URL
var url = '/' + gr.getTableName() + '.do?sys_id=' + grgetUniqueValue() + '&PDF';
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2024 05:09 AM
Hi @Ankur Bawiskar , so do you mean something like this?
I pointed the script I created, and added the new HTML response. So are you saying that by adding the code you provided, it will show the list of the invoices downloadable?