Email client - UI actions which populate the "to" field

sdhar
Kilo Contributor

Is it possible to make two different UI actions which put different values in the TO field on the Case email client?

I know that there is one email client template per table, but I have attempted to work around this by creating a UI action which sets a field and then opens the email client, where the template is reading that field. However I'm having trouble combining the server-side code with client side and then opening the email client on top of that.

Thanks for your help.

1 ACCEPTED SOLUTION

Use the solution provided in below thread

https://community.servicenow.com/community?id=community_question&sys_id=660e6edadb7f1b04fece0b55ca96...


Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

11 REPLIES 11

Use the solution provided in below thread

https://community.servicenow.com/community?id=community_question&sys_id=660e6edadb7f1b04fece0b55ca96...


Please mark this response as correct or helpful if it assisted you with your question.

sachin_namjoshi
Kilo Patron
Kilo Patron

While not as flexible as a notification, you can hard code an email via script that can be called by a UI action. Below is an example:

 

 

 

var emailNotification = new GlideRecord('sys_email');

 

emailNotification.type = 'send-ready';

 

emailNotification.subject = 'Email subject';

 

emailNotification.body = 'Email body';

 

emailNotification.recipients = email-adress1 + ',' + email-address2;

 

emailNotification.insert();

 

Regards,

Sachin