- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2016 06:19 AM
Hi All,
I would like to send an email out from the list view? Is this possible?
I will explain a little more.
Scenario:
Lets assume I am running a filter on Incident table. It will return a set of Records and all of these Incidents returned will have an "assigned to". I would like to send a notification to all the "assigned to" users.
I hope we may have to use a "List Choice" UI Action here. Any body has any idea in this regard?
Your help will be very much appreciated.
Regards,
J
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2016 07:20 AM
Hi Jithin,
You can do this via a scheduled job which needs to run based on your preference..
you should use addEncodedQuery('query') to get the desired records. Once you executed the query, you need to have an event to trigger for notifications.
for Example
var gr= new GlideRecord('incident');
gr.addEncodedQuery('active=true');
gr.addNotnullQuery('assigned_to');
gr.query();
while(gr.next()){
gs.eventQueue('eventname',gr, gr.assigned_to,"");
}
The same thing you can achieve it via List UI action as well.
Regards,
Jagarnath

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2016 06:28 AM
Hi Jithin,
You are on the right track. A list choice UI action is what you will need to go through each record and retrieve the information to send the assigned_to a message. (You may want to consider de-duplicating entries in that list so the same person doesn't get 10 messages - or perhaps that's what you want.)
I don't use list choice UI actions all that often. When in doubt, use an existing UI action of the same type as a template, make a copy, and modify to your needs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2016 07:37 AM
Hi ctomasi,
Thanks for the suggestion. Have you implemented anything like this before. I couldn't find any related OOB UI Actions.
Regards,
Jithin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2016 07:43 AM
take the entry from the list action for selected records, and pass them to a script include,.
now for each object(glibe object to incident) you have to make perform an insert operation on sys_email table
something like this
var gr = new GlideRecord('sys_email');
gr.initialize();
gr.subject = 'blah blah'
gr.mailbox.setDisplayValue('Outbox');
gr.body = 'blah blah';
gr.content_type = 'multipart/mixed';
gr.state='ready';
gr.target_table = 'incident';
gr.type='send-ready';
gr.uid='N/A';
gr.recipients = inc.user.email;
gr.setNewGuid();
gr.insert();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2016 01:00 AM
Hi Anurag,
Thanks for the reply. Can you please make your point a little more clear?
Regards,
Jithin