Find relaxed attachment sys_id with duplicate file names

Tobias Persson_
Tera Expert

Hi community,

 

some of our users use the same file name each time they upload a new file. Now I need to get the correct sys_id associated with the record on our uploads table. The problem here is that I only find solutions where I would use GlideRecord API on sys_attachment and querying the file name - which in our case would get multiple results.

The funny thing is that ServiceNow always opens the correct attachment when it is clicked inside the record. So, how does ServiceNow do this when the file name is repeatedly found in sys_attachment? There must be a place where the correct sys_id has been stored.

 

Does anyone know a solution to this?

 

Regards,

 Tobias

1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

@Tobias Persson_ 

it identifies each record with sys_id hence it's able to open the correct record

what's your business requirement here? can you explain with screenshots?

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