Display ticket number in title bar in browser window

chaider
Kilo Explorer

Has anybody done anything with showing the ticket number in the title bar in the browser window?

1 ACCEPTED SOLUTION

Mark Stanger
Giga Sage

I think this will work for you. You can set up a UI Script under the 'System UI' application with the script below. The UI Script will have to have the 'Global' checkbox checked. This script sets the number and short description in the title if those elements are found on the form. If they aren't found, then a standard title is used.



addLoadEvent(setTitle);
function setTitle(){
try{
var num = g_form.getValue("number");
var sd = g_form.getValue("short_description");
}catch(e){
//alert('Error getting title info.');
}
if(num && sd){
top.document.title = num + ' - ' + sd;
}
else{
top.document.title='Service-now.com - IT Service Management Suite';
}
}


View solution in original post

7 REPLIES 7

Inactive_Us2053
Giga Contributor

I've just tried the above script and though it appears to work, on the Dublin release it stops any Homepages from loading and also the front login screen (this is using Chrome).   Oops


My bad - I forgot the 'catch'.   Now works perfectly, thanks!


abhishekbasu
Kilo Expert

Hi Curtis,



This can be easily done without using scripts. Just go to dictionary entry for Incident. Select the 'Number' Column.



You will get the task table entry for Number, just select the Display checkbox and save the entry.



find_real_file.png



This is make the Number(Incident, Change, Problem, etc) appear in the browser title bar.



I know you have found the solution using script, but this is a workaround if you decide not to use Scripts.