Need to hide start/pause/stop icon from time worked field

MBarrott
Mega Sage

MBarrott_0-1713208406744.png

 

How can I hide or remove this icon? 

 

I found a solution for just the incident table but would like to expand this to all task related tables and anything else that is utilizing the time_worked field. 

 

Working solution for INC records via onLoad Client Script:

$j('div[id="element.incident.time_worked"]').children('.form-field-addons').hide();

 

3 REPLIES 3

James Chun
Kilo Patron

Hi @MBarrott,

 

You can apply the script on the [task] table and in the Client Script, select 'Inherited' to true to apply the script across all Task extended tables.

Since this is DOM manipulation, I wouldn't recommend it but the above should fix your issue.

 

Cheers

 

Sumanth16
Kilo Patron

Hi @MBarrott ,

 

Please refer to below thread:

https://www.servicenow.com/community/developer-forum/hide-play-pause-button-for-time-worked-field-fo...

 

If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!

 

Thanks & Regards,

Sumanth Meda

surajnikam111
Tera Guru
Tera Guru

Hi @MBarrott ,

I have written same on load script for incident, but it is not working.  I don't see second alert. Any suggestion?

 

    alert("hello");
    $j('div[id="element.incident.time_worked"]').children('.form-field-addons').hide();
    alert('hello 2');
 
Thanks