how can I add attachments to multiple records at once from the list view?

Ken61
Giga Guru

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.

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@Ken61 

not possible out of the box.

you might have to come up with some custom solution

The link you shared; what's it doing ?

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Ratnakar7
Mega Sage
Mega Sage

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

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

 

Ken61_0-1682941779989.png

Thank You