Quantcast
Channel: ServiceNow Community - Post implementation
Viewing all articles
Browse latest Browse all 108

Pausing timer on tab/window change

$
0
0

I currently have the timed worked field running (hidden) on the incident form. Many of my agents open/work multiple incidents.

I want to pause the timer when the agents opens/switches to new tab/window. And when they come back (in focus I guess) it unpauses the timer.

I assume it is some kind of onFocus() function, but I am not sure. The time work script I include here is from Mark Stanger (I believe).

function onLoad() {
if (g_form.getValue('incident_state') =='7')
toggleTimerByFieldName("incident.time_worked");
g_form.setValue("time_worked","00:00:00");
}

read more


Viewing all articles
Browse latest Browse all 108

Trending Articles