How to hide Group Tasks tab in Time Sheet portal

Talya
Tera Contributor

Hi All,

 

I want to hide the Group Tasks tab in Time Sheet Portal. Please help. 

Talya_0-1673933656926.png

 

Thanks,

Talya

1 ACCEPTED SOLUTION

Shruti
Mega Sage
Mega Sage

Hi,

You can edit the HTML section of Time Card Portal - Task Selector widget. Comment the second list item

ShrutiW_0-1673936097776.png

 

Instead of making changes to the OOB widgets try to clone the Time Card Portal - Task Selector widget and Time Card Portal Main Container widget

Embed the cloned Time Card Portal - Task Selector widget in the cloned Time Card Portal Main Container widget

View solution in original post

6 REPLIES 6

Shruti
Mega Sage
Mega Sage

Hi,

You can edit the HTML section of Time Card Portal - Task Selector widget. Comment the second list item

ShrutiW_0-1673936097776.png

 

Instead of making changes to the OOB widgets try to clone the Time Card Portal - Task Selector widget and Time Card Portal Main Container widget

Embed the cloned Time Card Portal - Task Selector widget in the cloned Time Card Portal Main Container widget

Talya
Tera Contributor

Thank you so much @Shruti  for your help.

I am new to ServiceNow , hence I would like to understand about cloning widgets.

I am making changes to Server Script also in 'Time Card Portal - Task Selector widget' , to make it display only Project and Project tasks and not ITSM tasks (incident, change or Problem)

 

So I wanted to understand, if I clone Time Card Portal - Task Selector widget and Time Card Portal Main Container widget and make changes to Server script and HTML template, 

1. Where all should I make sure these custom widgets are called instead of OOB widgets? 

2. In Documentation it is mentioned that cloned widgets are considered custom and don't benefit from future updates to the widgets they were cloned from.

So in case of future upgrades if any new feature added to those OOB widgets , it won't be part of our custom widgets?

3. Even if we are making minor changes , is it not suggested to change OOB widgets?

 

Please share these details. It will be very helpful for newbies like me.

 

Thank you,

Talya

 

1. Make sure you are calling these custom widgets in the page designer

2. Yes, if any new feature is added to OOB widgets as a part of future upgrade, it won't be added to custom/cloned widgets

3. It is not suggested to make changes to the OOB widgets. Best practice is to clone the OOB widgets and customize it according to the requirement

Talya
Tera Contributor

Hi @Shruti  ,

I cloned the 'Time Card Portal Main Container' widget as 'Custom Time Card Portal Main Container' and replaced it using 'instance in Page Editor' option.

 

I cloned the 'Time Card Portal - Task Selector widget' as 'Custom Task Selector' and made all the changes.

In 'Custom Time Card Portal Main Container' server script I replaced the highlighted line with 'Custom Task Selector'

Talya_0-1674193132464.png

 

but I don't know how to find if somewhere else also if the OOB widget was called, so that I can replace everywhere.

 

Being new to ServiceNow, not able to understand. Can you please help here.

 

Thanks,

Talya