using email address in Event Parm1 not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-29-2016 11:52 AM
Hi guys
I'm trying to create a bounce back notification to the user whenever they attempt to create a ticket via email.
On the existing Inbound Email, I triggered an event:
gs.eventQueue("create_ticket",current,email.origemail,"");
Parm1 - email address of the sender/requestor
Parm2 - empty, I just need one email.
The event perfectly works.
Going to notifications, I tried couple options to make it work:
1. Clicking Event Parm1 contains recipient. - did not work (Base on the forms that I read, you need the user sys_id?)
2. Creating email script where:
var requestor = even.parm1;
email.setReplyto(requestor);
var email_body = "This is a bounce back email notification";
template.print(email_body);
Still not working.
Am I missing something on the script? Can this be done using an event?
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-29-2016 12:04 PM
Just curious why you'd want to create an email this way. When a new ticket is created, doesn't that action trigger a notification email to the user?
Hope this helps.
Please feel free to connect, follow, mark helpful / answer, like, endorse.
| John Chun, PhD PMP | ![]() |
Winner of November 2016 Members' Choice Award
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-29-2016 12:16 PM
Our client wants to disable the creation of ticket via email (Before, users can create ticket by sending an email).
What I did is I updated the Inbound email, and when someone tries to create one by sending email, they will receive a bounce back email saying "You cannot create ticket through email, we advise you to use service portal" something like that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-29-2016 12:26 PM
email.setReplyTo() method does not work at all. And coming to the event parameter, you can either use sys_id of the user record or email address. Go to the event log and search for your event and see what you get in parm1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-29-2016 12:38 PM
Ah, makes perfect sense now.
For Parm1, I'd pass the Sys ID of the user using the gs.getUserID() method from your Inbound Action, so you don't have to set the recipient's email address in your Notification.


