Manas Kandekar
Kilo Guru

I got the requirement to hide only the 'Inactivity warning' emails from the Activity log for Incident. All other emails should be there in Activity.

I have performed the following step.

1. Created onLoad client script for INC to perform DOM manipulation.

function onLoad() {

//---------to hide 'Inactivity warning Activity' for UI 15
var x = document.getElementsByClassName("activity_header");
var s = document.getElementsByClassName("activity_data");
var s1 = document.getElementsByClassName("activity_spacer");
for(var i=0;i<x.length;i++)
{
if(x[i].innerHTML.indexOf("Inactivity Warning") > -1)
{
//alert('hello');
x[i].style.display = 'none';
s[i].style.display = 'none';
s1[i].style.display = 'none';
}

}

//---------to hide 'Inactivity warning Activity' for UI 16
var x1 = document.getElementsByClassName("h-card h-card_md h-card_comments");
for(var j=0;j<x1.length;j++)
{
if(x1[j].innerHTML.indexOf("Inactivity Warning for") > -1)
{
x1[j].style.display = 'none';
}
}
}

 

Extension for the above requirement can be.

1. If you don't want to allow specific user or groups to view particular emails then they can create the logic to check the user and use above code to hide the email.

*Tested on London and New York.

Comments
Nayan Mahato
Tera Guru

Simply navigate to the Email Access Restrictions (email_access_restriction) table and create a record for the specific notification you want to restrict. The restriction will then be applied automatically.

Thanks,
Nayan

Version history
Last update:
‎11-15-2019 12:14 AM
Updated by: