Auto-expand Inbound mails on Incident activity

domaners
Kilo Guru

Is it possible to allow Emails displayed on the Incident activity UI Formatter to be automatically expanded when an Incident is opened? As we give most of our caller updated via the email button, it would be useful for our analysts to be able to see all of the updates at a glance, rather than having to click the + sign on each item. If this could be switched on / off per user then even better! Thanks.

1 ACCEPTED SOLUTION

Andre Moreira
Kilo Expert

Hi Adam Domanski,



With a little of jQuery Magic you can do it:



($$("img[onclick*='ActivityFilter.activityEmailToggle']")).each(function(item){item.click()});



Here the documentation:



Attribute Contains Selector [name*="value"] | jQuery API Documentation



[]'s


Andre Moreira


View solution in original post

18 REPLIES 18

ewanh
Kilo Expert

Sorry Novice question: Where does one enter this script?


ewanh,



You can enter this Script using the onLoad() Scripts.



[]'s


Andre Moreira


ewanh
Kilo Expert

So....not working for me...



Table = Incident


Type = onLoad



Script =



function onLoad() {


    //Jelly jquery script to expand HTML emails by default when opening an incident




  ($$("img[onclick*='ActivityFilter.activityEmailToggle']")).each(function(item){item.click();});


}


What is the Release of you ServiceNow instance?


Sorry Andre.   Was away.   Fuji Patch 9.   Just tested again and it isn't working for me.