Sending Email from List View

Jithin2
Tera Contributor

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

1 ACCEPTED SOLUTION

jagarnathn
Tera Expert

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


View solution in original post

6 REPLIES 6

jagarnathn
Tera Expert

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


Thanks Jagarnath....It worked....Only thing is while is causing multiple emails to go out. I have replaced with an if() and it worked fine.



Regards,


Jithin