- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2009 04:54 AM
Hi
I searched the forum and wiki but with no luck. Is there any tricky way to display the task number in browser window title, i.e. replacing ... with
? Refer to the attached screenshot.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2009 05:17 AM
I've used this script before. It sets both the number and short description if they are there. You'll need to use this code in a new UI script record under 'System UI -> UI scripts'.
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';
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2009 05:17 AM
I've used this script before. It sets both the number and short description if they are there. You'll need to use this code in a new UI script record under 'System UI -> UI scripts'.
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';
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2009 04:43 AM
Many thanks Mark. This is exactly what we need
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2009 04:44 AM
Hmm.. It works perfectly but the window title stays "INC000 -bla-bla" when I return to the LIST of incidents. That;s not really good and I have no idea how to overcome this since we have frames here. Is there any way to reset it back to "IT Service Management..." when user gets back to the list or homepage?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2009 06:43 AM
I'm using this exact script on my instance and I'm not seeing this issue. The script is specifically designed to avoid this problem. If you PM me the instance name where you've got this set up I can take a look. You could also test this on the Service-now demo site. I've got it set up there and it's working just fine there.