- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2015 09:32 AM
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2015 01:39 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2015 01:55 PM
Hi,
I was referring to the client side script. It doesn't matter much whether using an UI policy or a client script eventually its a client side script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2015 11:54 PM
Hello All,
Thanks doe your suggestions. Below script hides emails completely in activity log including headers
var h = document.getElementsByClassName('activity_header');
var d = document.getElementsByClassName('activity_data');
if(h){
for(var i=0;i<h.length;i++){
if(h[i].innerHTML.indexOf('Email sent')>-1 || h[i].innerHTML.indexOf("Email Received")>-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
‎06-16-2016 05:21 AM
Although this post has been marked as answered, I would like to ask an additional question.
This is the post closest to a solution for my issue that I can find.
Is it possible to exclude the mail from activity list based on either:
The subject of the inbound mail?
or
The inbound action that processed the mail?
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2016 09:50 AM
I guess you can do it. Although I have not tested it, make below changes and it might work
var h = document.getElementsByClassName('activity_header');
var d = document.getElementsByClassName('activity_data');
if(h){
for(var i=0;i<h.length;i++){
if(h[i].innerHTML.indexOf("Email Received")>-1 && h[i].innerHTML.indexOf("subject of your email")>-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
‎07-01-2016 02:24 AM
Hi Abdul,
I can confirm that your code does work.
That is if you make one adaptation. You need to look for the "subject of your email" in the activity data and not in the activity header.
A second difference in my code is that I keep the activity header visible, and only hide the actual mail.
Code that I used:
function onCondition() {
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 of your mail')>-1 && h[i].innerHTML.indexOf("Email Received")>-1)
{
//h[i].style.display="none";
d[i].style.display="none"
}
}
}
}