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

Community Alums
Not applicable

Hi @dev115415 ,

 Yes we can fire event from include script using eventQueue , Make sure your passing the glideobject instead of current.

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 glideobject.

Hello @Community Alums  could you please tell me why to not use current and use glideobject?

Karan Chhabra6
Mega Sage

Hi @dev115415 ,

 

Only parm1 and parm2 are optional parameters, you ought to pass rest of them

KaranChhabra6_0-1685649936799.png

 

Thanks!