How to Remove Work Notes from Activity Section in Service Portal?

zee15
Tera Contributor

Hi Everyone,

I have a requirement to remove Work Notes from the Activity section in the Service Portal.

zee15_0-1783660770372.png

 

I reviewed the Activity Widget, but I wasn't able to identify where the required changes need to be made.

Could someone please help me understand:

  • Which widget or component needs to be cloned or modified?
  • Where exactly should the changes be implemented to remove Work Notes from the Activity stream?
  • Are there any best practices or out-of-the-box configurations that can achieve this?

Any guidance or suggestions would be greatly appreciated.

Thanks in advance!

2 REPLIES 2

BharatC
Mega Guru

Hello @zee15 

 

1. Which widget needs to be cloned or modified
The widget responsible for displaying the Activity stream in Service Portal is:

Widget Name: Activity Stream
Widget ID: activity-stream

Since modifying OOB widgets directly is not recommended, clone the widget first by opening it in the Widget Editor and clicking Clone Widget. All your changes should be made on the cloned copy.

 

2. Where exactly to make the changes
Once you have cloned the widget, you need to modify the Server Script section of the widget. Look for the section that fetches journal field entries — specifically where it queries or filters journal_input field types.
Work Notes in ServiceNow are stored with the element name work_notes and are flagged as private journal entries (private = true). Additional Notes (Customer visible) use comments and are non-private.
In the Server Script, locate the filter that pulls journal entries and add a condition to exclude work notes:
javascript// Find and modify the filter that retrieves journal/activity entries
// Add this condition to exclude work notes
element != 'work_notes'

// Or if filtering by the private flag:
private != true
The exact variable name may differ slightly depending on your ServiceNow version, but look for an array or query block that references sys_journal_field — that is the table that stores both comments and work notes.

 

3. Also check the Client Controller
In some versions, the Activity widget also processes entries on the client side. In the Client Script section, look for any loop or filter that processes the activity data array and add a similar exclusion:
javascript// Filter out work notes on the client side as well
data.activities = data.activities.filter(function(entry) {
return entry.element !== 'work_notes';
});

 

4. Update the widget HTML (optional but recommended)
If work notes entries are being rendered with a specific CSS class or label in the HTML template, you can also conditionally hide them using an ng-if directive:
html<div ng-repeat="entry in data.activities" ng-if="entry.element !== 'work_notes'">
<!-- activity entry markup -->
</div>
This ensures nothing leaks through even if the server-side filter misses an edge case.

 

5. Replace the widget in your Portal page
After cloning and modifying, make sure your Service Portal page or record page is pointing to the cloned widget and not the original. Update this via:
Service Portal → Pages → (Your Page) → Layout — swap the OOB widget reference with your cloned version.

 

If this helps, pls click on helpful and accept solution.

Best Regards,

Bharat Chavan

Bhavya11
Kilo Patron

Hi @zee15 ,

Please go through below thread 

How to remove worknotes comments in widget

If this information proves useful, kindly mark it as helpful or accepted solution.

Thanks,
BK