Disable edit on Time Worked field

milesdpratt
Giga Contributor

We have a request to make the time worked field read only to disable edits to the time. I tried making it a read only field, but that removes the timer completely.

Anyone know how to keep the timer running but disable edits to the hours/minutes/seconds fields?

1 ACCEPTED SOLUTION

open ui policy and short desc is "Time worked read only"



Regards,


Harish


View solution in original post

14 REPLIES 14

Brad Tilton
ServiceNow Employee
ServiceNow Employee

You could put the following in an onload client script:



$$('.input_controls input').each(


  function(inputBox) {


          inputBox.readOnly = true;


  }


);



I wouldn't normally use DOM manipulation to make something read only as you should really go through ACLs, but this seems like a special case with that field.


Harish Murikina
Tera Guru

Hi Miles,



                            Here i did in demo check .


https://demo009.service-now.com/login.do


Uname and pwd : admin



Once you login create new incident   you can see readonly time worked field.



Regards,


Harish.


Here time worked read only but still its running.



time worked.JPG


This link just redirects to the sandbox.