How to setup a notification for the Task Assigned To from a change on the Request?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2016 11:49 PM
Hi all,
How would I set up the Service Catalog such that when a user adds a comment to Additional Comments (On the Request), an email notification is sent to the Assigned To (On the Task)?
Regards,
Luke

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2016 10:41 PM
Hi Luke,
Here is the sample code for reference. Please add additional addQuery to filter the exact task.
var gr = new GlideRecord('sc_task');
gr.addQuery('request', current.sys_id);
//Here add one more query to filter the exact task
gr.query();
if(gr.next())
{
var assigned_to = gr.assigned_to;
gs.eventQueue(eventname,current,param1,param2); //This is just syntax
}
Reference :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2016 11:54 PM
Hi Pradeep,
What if we want the notification to go to the Assigned To: of ALL of the Requested Item's Tasks?
Regards,
Luke

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2016 12:04 AM
In that case you the above query will work as it will query all the tasks.
Just add additional query to filter only active records.
gr.addQuery('active',true);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2016 04:34 PM
Hi Pradeep,
Thanks so much for your help! I have tried as you said but the message does not send. I have added as a test, my own email address to the Notification 'Who will Recieve" and the Notification is triggered under the correct circumstances, it just wont send to the Task Assigned To:.
Below is how I have it setup:
Notification
Event
Business Rule
Any idea's?
Regards,
Luke

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2016 04:39 PM
Can you make sure send to event creator is checked to true. Click on related link in email notification to check for this field under "who will receive" tab