Notification set to 'Off' by default
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2012 03:01 AM
Hi,
I've been asked to create a email notification (when an incident is assigned to you) for all the support people but switched off by default, so that they can turn it on themselves if they want it.
I've written the JavaScript to create the notification, for one user so far for testing, but I can't get it to be 'off' by default. cmn_notif_message doesn't have an Active field, and I've tried setting send_email=False.
Can someone please give me some pointers as to where I need to look.
I've attached my script, and the flag I'm trying to set.
Thanks.
Alan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2012 06:56 AM
Hi Alan,
It looks like you have to set notification_filter (reference to notification_filter) to the sys_id of the "Unsubscribe" record on notification_filter, on demo it is 'c1bfa4040a0a0b8b001eeb0f3f5ee961'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2012 08:22 AM
Thanks, that's sorted it.
Alan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2012 03:37 PM
For some reason I am not able to see your attachments. I found the Notification Filters under System Policy that Shane mentioned, but can you please tell me where exactly you added this? Is it in a script or condition somewhere? I checked to see of "Notification Filter" was available if I personalized my form, but it wasn't. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2012 01:17 AM
I was creating the notification subscriptions in a background script, so I had to look up the sys_id of the 'Unsubscribe' notification filter record, and then set the notification_filter field on the new cmn_notif_message record to that sys_id.
I've attached the entire script, but this snippet is how I got the filter record:
// Get reference to Unsubscribe notification filter
var filterRec = new GlideRecord('notification_filter');
filterRec.addQuery('name', 'Unsubscribe');
filterRec.query();
filterRec.next();
If you're doing it through the front end, you set the filter by going to the notification preferences in the user's profile and turning the notification off.
Alan.