How to pass 3 parameters in gs.eventqueue()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2021 08:41 PM
Hi,
I have a scenario where from inbound action to notification I need to pass 3 parameters.
email.subject
email.origemail
sender's name
When I write it like below. It's not working. How can I pass this. Any help will be highly appreciated!
gs.eventQueue("incident.autoreply", current,email.subject,email.origemail,"Sender's name");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2021 09:06 PM
HI
Below is about gs.event queue method.
here is the synax to pass 3 parameters .
gs.eventQueue('event.name', GlideRecord, parm1, parm2); // standard form
for example ::
gs.eventQueue('contact.inserted',current,current.u_email_address);
Here
1)'contact.inserted' :-It is event registry which register in registry under the application, and it is state contact inserted event as per the event registry name .
2)current :- It is glide record object that we have access of (current and previous) in event queue method
3)current.U_email_address :- It is first param of event queue method which is shows the email address of current record used in method.
This is like standard form of declaring event queue
Thanks and regards
Sure Sai Venkatesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2021 09:10 PM
So How can I pass 3 params email subject, sender's email and sender's name there can u please guide me
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2021 09:26 PM
Hi
As event has take upto 2 parameters so you can pass the parameters in json object and then refer them in email script .
json object:
var test = {"first_name": "andrew","last_name": "joe","Location ": " London"};
and then should refer them in email scripts:
LIke example wrt above json object
var firstName = event.parm1.first_name.toString();
I think we can do by this way .
Thanks and regards
Sure Sai Venkatesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2021 10:12 PM
When I use in notification like below,
${event.parm1.first_name.toString()}
${event.parm1.first_name}
It shows as [Object object] as the values