- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2018 08:56 AM
Hi,
We have use "Activity stream @ notification" for emails to be triggered when user is mentioned using @ in the comments, i want to use a condition so that when caller is mentioned using "@" on comments, they should only receive updated notfication, and i don't want them to receive "The user has bee mentioned" notifiaction email.
Can anyone please help me whether we can implement this.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2018 04:01 AM
Try replacing your When to send advanced script with below
function shouldSend() {
//check if caller is mentioned
if (current.user==current.document.caller_id){
return false;
}
else{
var liveGroupProfileGR = new GlideRecord("live_group_profile");
liveGroupProfileGR.setWorkflow(false);
liveGroupProfileGR.addQuery("document", current.document);
liveGroupProfileGR.addQuery("table", current.table);
liveGroupProfileGR.addQuery("type", "!=", "support");
liveGroupProfileGR.query();
if(liveGroupProfileGR.next()) {
var liveGroupMemberGR = new GlideRecord("live_group_member");
liveGroupMemberGR.setWorkflow(false);
liveGroupMemberGR.addQuery("group", liveGroupProfileGR.getUniqueValue());
liveGroupMemberGR.addQuery("member", current.profile);
liveGroupMemberGR.addQuery("state", "!=", "inactive");
liveGroupMemberGR.query();
if(liveGroupMemberGR.next()) {
return false;
}
}
var SecurityManager = new SNC.LiveFeedSecurityManager();
return SecurityManager.canReadField(current.user, current.table, current.document, current.field_name);
}
}
shouldSend();
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2018 05:33 AM
Try this
function shouldSend() {
//check if caller is mentioned
if (current.user==current.document.caller_id || current.field_name !='comments'){
return false;
}
else{
var liveGroupProfileGR = new GlideRecord("live_group_profile");
liveGroupProfileGR.setWorkflow(false);
liveGroupProfileGR.addQuery("document", current.document);
liveGroupProfileGR.addQuery("table", current.table);
liveGroupProfileGR.addQuery("type", "!=", "support");
liveGroupProfileGR.query();
if(liveGroupProfileGR.next()) {
var liveGroupMemberGR = new GlideRecord("live_group_member");
liveGroupMemberGR.setWorkflow(false);
liveGroupMemberGR.addQuery("group", liveGroupProfileGR.getUniqueValue());
liveGroupMemberGR.addQuery("member", current.profile);
liveGroupMemberGR.addQuery("state", "!=", "inactive");
liveGroupMemberGR.query();
if(liveGroupMemberGR.next()) {
return false;
}
}
var SecurityManager = new SNC.LiveFeedSecurityManager();
return SecurityManager.canReadField(current.user, current.table, current.document, current.field_name);
}
}
shouldSend();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2018 05:42 AM
Thank you so much sir

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2018 07:22 AM
If your issue is resolved,please Mark the correct answer and close out this thread.