Attachment UI action

brozi
ServiceNow Employee
ServiceNow Employee

I had a request to create UI action for attachments instead of using the lil paper clip icon.

I just grabbed the onclick script (using firebug, firebug is cool!!)


saveAttachment('incident', '');


and created a new client UI action with the same onclick code on the incident table.

Nothing special, but thought some of you could use that to truly make something cool...

16 REPLIES 16

Community Alums
Not applicable

Didin't work Chris, tried all the ways... is it working for you? any changes i have to make?


I would just debug at this point, maybe first starting with throwing an alert in there for the csv variable and the array to make sure you have the correct values in there.   Then after that check the originalID variable and the newID variable.   You may also need to throw an orderBy in there:



                            var attDocGR = new GlideRecord('sys_attachment_doc');


                            attDocGR.addQuery('sys_attachment', originalID);


                            attDocGR.orderBy('position');


                            attDocGR.query();




Let me know what your findings are.