- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2022 09:05 PM
Hello,
I am able to pass a single parameter to the email from a script include doing the following::
var event_data = {};
event_data.to = to;
event_data.cc = cc;
event_data.additional_emails = additional_emails;
event_data.comment = comment;
// param: name of event
// param: obj
// param1: obj containg all data
gs.eventQueue("x_banun_creops.ReplyEvent", gCO, event_data.to, 'PARAM2');
email script::
gs.error("event.parm1.to.toString()");
gs.error( event.parm1 ); // this passess the email correctly
email.setReplyTo( event.parm1 );
I know I am passing the correct parameters because when I do gs.error(), I can see the correct values being passed.
but I don't see the notifications 'To' changing.
I would expect to see a value there.
I added the image of my notifcations
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2022 09:19 PM
Hi,
try this
var event_data = {};
event_data.to = to.toString();
event_data.cc = cc.toString();
event_data.additional_emails = additional_emails.toString();
event_data.comment = comment.toString();
// param: name of event
// param: obj
// param1: obj containg all data
gs.eventQueue("x_banun_creops.ReplyEvent", gCO, JSON.stringify(event_data.to), 'PARAM2');
email script::
var parser = JSON.parse(event.parm1); // parse the json
email.setReplyTo(parser.to); // fetch the value associated to to
regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2022 09:19 PM
Hi,
try this
var event_data = {};
event_data.to = to.toString();
event_data.cc = cc.toString();
event_data.additional_emails = additional_emails.toString();
event_data.comment = comment.toString();
// param: name of event
// param: obj
// param1: obj containg all data
gs.eventQueue("x_banun_creops.ReplyEvent", gCO, JSON.stringify(event_data.to), 'PARAM2');
email script::
var parser = JSON.parse(event.parm1); // parse the json
email.setReplyTo(parser.to); // fetch the value associated to to
regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader