Can i hide emails in Activity Log from some users?

Rakhi1
Kilo Contributor

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.

6 REPLIES 6

Shishir Srivast
Mega Sage

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.


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";


}


}


}


}


Hi Rakesh,

Were you able to accomplish the hiding of the email in the Activity Log?

Thanks,

Jocelyn

 

Kalaiarasan Pus
Giga Sage

The easiest way would be to add the activities formatter to a separate section and hide the section using g_form methods.