Hide Worknotes from activity in incident table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi,
I have a requirement to hide the worknotes field for certain users having a role. now that field is hidded the user can see the worknotes entered in the activities, Is there any way to hide the worknotes in the activities as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi @AbidJafrey
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
hi @AbidJafrey ,
Try this -
Customize the Activity Formatter (Activity Stream):
- The Activity Stream uses a formatter that pulls all journal entries (Work Notes, Additional Comments, etc.).
- To hide Work Notes from the Activity Stream for certain roles, you’ll need to:
- Override the formatter behavior using a Script Include or custom formatter logic.
- Filter out entries of type work_notes based on the user's role.
Else you can try this way as well -
Use ACLs (Access Control Rules):
You can create an ACL on the Journal Entry table (sys_journal_field) to restrict access to work_notes entries.
Example:
- Table: sys_journal_field
- Field: value
- Condition: element == 'work_notes'
- Script: Check if the user has a restricted role and deny access.
// ACL script example
var restrictedRoles = ['some_role'];
for (var i = 0; i < restrictedRoles.length; i++) {
if (gs.hasRole(restrictedRoles[i])) {
answer = false;
break;
}
}
Else you also use -
Use a Custom Activity Formatter:
- If ACLs don’t give you enough control, you can build a custom formatter that only shows additional_comments and hides work_notes for certain users.
NOTE -
- Be cautious with ACLs on sys_journal_field as they can affect other parts of the platform.
- Always test thoroughly in a sub-production environment before deploying.
Thanks,
Rithika.ch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
So the field itself is hidden for some users but the notes are still visible in activities?
If yes then how are you hiding that field? via field level READ ACL?
You can use Query business rule or Table.None READ ACL on sys_journal_field table and restrict it for your table
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader