Trigger email notification for reference fields

ar1
Kilo Sage

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.



1 ACCEPTED SOLUTION

@ar1 

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

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

5 REPLIES 5

@ar1 

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

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader