Additional Comments Email Notifications to Contact and Watch List
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2023 11:19 AM
Hi,
I need a help in advance condition in the notification.
When a contact post additional comment then the email should trigger to Watch List user and when watch List person comment then additional comment notification should trigger to contact.
I have written a advance condition.
Email to Watch List when Public Comment:(who will receive: Watch List )
if (current.sys_updated_by == current.contact.user_name) {
answer = true;
}
else {
answer = false;
}
Email to Contact when Public Comment:(who will receive: Contact)
Watchlist is referencing to sys_user table. what will be the condition here.
Please help me.
Thanks!
Samiksha
- Labels:
-
Customer Service Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2023 05:33 AM - edited 06-23-2023 05:37 AM
Hi @Riya Verma ,
Still not working.
var answer = false;
var watchListUserNames = [];
var watchListGr = new GlideRecord('sys_user');
watchListGr.addQuery('user_name', current.sys_updated_by);
watchListGr.query();
while (watchListGr.next()) {
watchListUserNames.push(watchListGr.user_name.toString());
}
if (watchListUserNames.indexOf(current.contact.user_name) > -1) {
//answer = true;
answer = (current.watch_list == current.contact.sys_id);
}