- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2023 08:47 PM - edited ‎03-05-2023 08:49 PM
Hi All,
We have one table with three reference [ Sub user, Req User and Cust User ]fields and the requirement is:
1. When "User communication" is added to the record we need to send email to "Sub User" field user. [We created email notification and it's working fine].
2. When "Sub User" field user reply directly to the email from outlook that he received, we need to send another email to Req User and Cust User fields users.
Can anyone please help us how to check the "Sub user" reply to user communications email.
Advance thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2023 11:19 PM
update as this
var deUser = current.req_user;
var portUser = current.portfolio.cust_user;
current.comments ="received from: " + email.origemail + "\n\n" + email.body_text;
gs.eventQueue('req_cust_user_email',current,demandUser + ',' + portUser);
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2023 09:28 PM
for the 2nd point you must have configured inbound email action on that table.
In that inbound action script you can use gs.eventQueue() and trigger the event to the other users
did you start on this?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2023 10:47 PM - edited ‎03-05-2023 10:49 PM
Hi Ankur,
Many thanks for the response.
As per your suggestions, we created one Event and coming to the inbound email action.
We created forward email action but we're not sure how to call the "Req user and Cust user" fields in gs.eventqueue();
Could you pls help us.
Advance thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2023 10:58 PM
your inbound action will be of type reply
your event will be on that table on which email was sent
Then in inbound action you can access field values of that record using current object and include those users as recipient list.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2023 11:13 PM
Hi Ankur,
Thanks for the response.
Could you pls check the below inbound email script once:
var deUser = current.req_user;
var portUser = current.portfolio.cust_user;
current.comments ="received from: " + email.origemail + "\n\n" + email.body_text;
gs.eventQueue('req_cust_user_email',current,demandUser,portUser);
Advance thanks.