Hide sent/received email from the activity log (formatter) based on fields, like caller, assigned to

SamuelTse
Tera Guru

Hi,

I was tasked to create something to control who can see the email in the activity log. Our requirement is to only allow the "caller" and "assigned to", maybe "assignment group" to see the email conversation in the activity log. I realize that we can control this by using the UI properties but I can only use specific roles. Is there a way I can control this by ACL? perhaps setting our requirement on the email table's "read" ACL?

I have not tried that yet. any advise will be greatly appreciated.

Thanks,

Sam

1 ACCEPTED SOLUTION

SamuelTse
Tera Guru

I might have found my own solution. All I did was to create an UI policy on Incident with the following configuration:



Conditions:


Assigned to, is not, javascript:gs.user_id(); AND


caller, is not, javascript:gs.user_id();



Script:


function onCondition() {


$j("[name='z*email*']").html(""))


}



This will remove the entire section of the email of each email sent/received. z*email* is the name of the div tag that contains the body of the email. I am okay to leave the header of the email sent in the activity log. I guess I can hide it if I want to, but I prefer to leave it. I assume you can use this method to fitter out or hide cetain information from the email in the activity log, just do a find and replace in html()



By no mean this is the most elegant solution. It's more of a hack from the client side. If anyone sees anythng problem with this approach or better yet, has a better solution, I am all ears



Thanks



Sam


View solution in original post

12 REPLIES 12

Hi Abdul,



Is it possible to hide itil centric emails from end users? For ex. if we've a checkbox in notification which identifies if it is a itil user centric mail. Is it possible to use that checkbox in above client script?


Hi,

does this script still work??

I tried using it on Incident. It din't work.

I want the email activity to hide based on a checkbox.

Andrew Bettcher
Kilo Sage

I tried this too. Took all the if statements and just brought back the document elements and told the onLoad client script to hide them. Didn't work.

Shame as the concept works perfect for my current issue and the fact that I can configure it how I like was like manna from heaven. Oh well. Back to the drawing board.