How to pass 3 parameters in gs.eventqueue()

SSA1
Giga Expert

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");

5 REPLIES 5

SAI VENKATESH
Tera Sage
Tera Sage

HI @SSA 

 

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 

So How can I pass 3 params email subject, sender's email and sender's name there can u please guide me

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

When I use in notification like below,

${event.parm1.first_name.toString()}

${event.parm1.first_name}

It shows as [Object object] as the values