how to access the param1 which sent from eventqueue in email body

k chaitanya kum
Giga Contributor

My scenario is in email body i want pass email id by using event que method

 

8 REPLIES 8

User166992
Tera Guru

Hello Chaitanya,

 

You can access the Event Parameters as 

event.parm1
event.parm2

To access above in Email notification, you need to create email script and use above method to access the required parameter.

You can access email script in email notification as below:

${mail_script:script name}

Let me know if you have any further queries.

Best Regards,
Jai

iam writing this code

gs.eventQueue('email',current,'babugiri83@gmail.com');

here email is my event name 

my senrio is using business rule to access email body

Hello,

 

You need to update email notification to call Email script. Add below line in your notification-

${mail_script:u_EventParam1}

Create new Email script as below-

Name - u_EventParam1
Script -
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {

template.print(event.parm1);

})(current, template, email, email_action, event);

Best Regards,
Jai

Mike Patel
Tera Sage

you can also do ${event.parm1} in Notification Message HTML directly.