How to use gs.eventQueue()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-01-2023 12:31 AM - edited ā06-01-2023 01:16 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-01-2023 12:34 AM
Hi @dev115415 ,
Yes we can fire event from include script using eventQueue , Make sure your passing the glideobject instead of current.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-01-2023 01:09 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-04-2023 12:22 PM
Hello @Community Alums could you please tell me why to not use current and use glideobject?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-01-2023 01:06 PM
Hi @dev115415 ,
Only parm1 and parm2 are optional parameters, you ought to pass rest of them
Thanks!