Can i hide emails in Activity Log from some users?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2017 02:10 PM
Hi... On my INC form Activity Log, I wanted to hide some emails from some users.
For Example, If the current user company is X, I don't want to show emails where the email subject is like "xxxxxxxxxxxxxxxxxxxxxxxxx".
I tried something as explained in below link. But no luck
Hide sent/received email from the activity log (formatter) based on fields, like caller, assigned to
Can anyone please help me on this??
Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2017 03:10 PM
Hi Rakesh,
Please check this thread: https://www.servicenowguru.com/system-definition/remove-activity-log-journal-entries/ , here it has suggested to have a UI action to remove the entry from sys_audit and sys_journal_field table. Please check if you can create a After Business Rule with the same logic. Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2017 06:35 AM
Hi Shishir..
I don't think it is going to work for my situation, as I am not looking to update or delete anything here. I wanted to hide some emails in Activity from some users.
The below script that what i am trying to use here. Can you suggest me if something is wrong in that script?
function onLoad() {
var h = document.getElementsByClassName('activity_header');
var d = document.getElementsByClassName('activity_data');
if(h){
for(var i=0;i<h.length;i++){
if(d[i].innerHTML.indexOf('<Subject:xxxxxxxxxxxxxxxxxxxxxxxxx>')>-1 && h[i].innerHTML.indexOf("Email Sent")>-1)
{
h[i].style.display="none";
d[i].style.display="none";
}
}
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2018 06:48 AM
Hi Rakesh,
Were you able to accomplish the hiding of the email in the Activity Log?
Thanks,
Jocelyn

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2017 08:29 PM
The easiest way would be to add the activities formatter to a separate section and hide the section using g_form methods.