How to Hide Activities in all Table

hanwar2
Kilo Sage

hanwar2_0-1735273742689.png

 

2 ACCEPTED SOLUTIONS

@hanwar2 

this small script worked for me

Ensure your onLoad client script has Isolate Script = False so that DOM manipulation works.

document.getElementById('sn_form_inline_stream_entries').style.display = 'none'; // to hide

$j('.activity-stream-label-counter').hide();
$j('#activity_field_filter_button').hide();

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

Hi @hanwar2 ,

 

Follow below steps.

  1. Go to form view and right click on header and choose form layout.
  2. Move filtered from left to right and save.
  3. RunjayPatel_0-1735278812831.png

     

I have showcased you for incident similarly you can do it for rest others. its simple.

Hardly you need to for 20-25 tables not more than that.

 

-------------------------------------------------------------------------

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------

View solution in original post

12 REPLIES 12

You are a Genius 🕺

it worked!!

 

Hi Ankur, 

Is there a way we can create UI Action Button to display Activities in each table for e.g. Incident only when it required by the user

Hi @hanwar2 ,

 

Writing a global script to hide activity that through DOM is highly not recommended, it will cause the performance issue.

 You can identify the table, do form configure and remove the activity filtered.

 

-------------------------------------------------------------------------

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------

Hi Runjay, 

 

Please suggest How can I do for each table like for Incident, Change.

Hi @hanwar2 ,

 

Follow below steps.

  1. Go to form view and right click on header and choose form layout.
  2. Move filtered from left to right and save.
  3. RunjayPatel_0-1735278812831.png

     

I have showcased you for incident similarly you can do it for rest others. its simple.

Hardly you need to for 20-25 tables not more than that.

 

-------------------------------------------------------------------------

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------