how can I add attachments to multiple records at once from the list view?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-30-2023 07:29 PM - edited ‎04-30-2023 07:29 PM
Hello All,
I have a requirement to add attachment to multiple selected records from the list view.
We have records that we want to add attachment to. We want to do this through list view be selecting several records and add the attachment to the at the same time instead of opening the record one by one.
I saw this LINK but it does not solve the issue. I will appreciate if I can get solution to this.
Thank You.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-30-2023 08:47 PM
not possible out of the box.
you might have to come up with some custom solution
The link you shared; what's it doing ?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-01-2023 01:24 AM
Hi @Ken61 ,
You can achieve this by creating a UI action on the table and then adding a pop-up dialog box where the user can select the attachment file(s) to be added.
Here is the sample code UI:
var gr = new GlideRecord('<table_name>');
gr.addQuery('sys_id', 'IN', g_list.getSelected());
gr.query();
while (gr.next()) {
// create and attach the attachment to the current record
}
Thanks,
Ratnakar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-01-2023 04:50 AM
Hi @Ratnakar7
Thank You for your quick response.
Where do I need to use the code to add the pop-up box. I tried to add it to the UI action that I created but it's not working as expected. Below is the screen shot to my UI Action
Thank You