How to use gs.eventQueue()

dev115415
Tera Expert

How to use gs.eventQueue() in script include for the purpose of sending email.

eventQueue(String name, Object gr, String option1, String option2, String event_queue) 

I actually do not want to use the 2nd parameter GlideRecord. When I do not use "current" in the 2nd parameter in an event queue like for example 

gs.eventQueue('x_1041234_needlt.eventForSendingMail',current,'abcd','efgh');

then I am not able to send the mail.

also if I simply use gs.eventQueue('x_1041234_needlt.eventForSendingMail'), then also I am able to send email properly.

I do not want to use glideobject because my business logic doesn't need it. I want to use eventQueue() in a way that I pass the event name that will be fired, and some normal parameters but no gliderecord/glideobject.

 

 

5 REPLIES 5

Hello

But if I use only one parameter then also mail is sent properly. I used

gs.eventQueue('x_1041234_needlt.eventForSendingMail')

 

Also I got an answer that I can send a '' in the 2nd parameter instead of GlideRecord/GlideObject object.

My main objective is to send some data in mail that I get in script include. I think that we can send in 3rd and 4th parameter. This data I want to fetch in email body. I saw some people using ${event.parameter2}. So I want to know what is this and how to use it.