OnClick of Attachement Button

Markell
Tera Guru

Hi Guys

The basics of what i am trying to do i simply show a custom Message when a user clicks on the Attachment paperclip icon.

I'm guessing this would be done via a UI Action, but I don't know how to access or call the Attachment button. 

I've tried using Google developer view to find out but no luck.

 

Has anyone done this before or even just know what the 'value' of that Icon is?

If you know where I can access the original onClick script for the attachment Icon (there must be one to fire the attach file feature) that would be helpful also 🙂

 

Thanks in Advance

1 ACCEPTED SOLUTION

Hi Markell,

you can check the attachment ui page. but since you want to add some custom text besides choose file button you need to copy that ui page and name as per your wish and call that ui page or else it would be global change.

Where are you stuck?

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

View solution in original post

18 REPLIES 18

Hi Markell,

Showing text besides the Choose file should be achievable. but for this you need to create copy of attachment ui page and call that via GlideDialogWindow and the above onClick won't work

but showing alert on the click of choose file is somewhat difficult

Regards

Ankur

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

Thanks so far 🙂

So as an FYI

  • Located the UI Page by using Navigator and click 'UI Page'

     find_real_file.png

  • Click on the Attachment UI Page
  • Go to the Attachment HTML Table (line 121/122)

 

find_real_file.png

 

Remember to write this code in HTML format. My Custom message is on line 122.

 

Now when I click on the attachment Paper clip it shows up like the below image (in test, this is not the final message)

 

find_real_file.png

Thanks

Thank you

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

Markell
Tera Guru

Any help on this?

 

Just checking in to see if anyone could even provide me with the 'value' for the button or even the location of the script in Servicenow that fires the generic Attachment alert so I can look at copying or editing it.