Email client template with groups

Mohamed Faizel
Giga Expert

Hi All,

I have to hard-coded the groups in email client template "to" field. I tried to put the group name in email client "to" its not working.

Is there any way to achieve this?

Thanks.

Faizeal.

3 REPLIES 3

dave_slusher
ServiceNow Employee
ServiceNow Employee

Faizeal,



I'm not sure I understand what isn't working for you. If you look at your template and go down to the Notfications related list, you can define the condition to send an email with this template and also who gets that email under the "Who will receive" tab. From that tab you can select users and/or groups.



If that doesn't address your question, can you post some examples of what you have currently so I can understand your problem better.



Thanks,


Dave


Hi Dave,



Thanks for your reply, actually i am talking about the Client templates i,e., Email --> Client Template. I think you were talked about the Notification emails template. Hope you understand now.


Hi Faizeal,



I think for that u need to use email script and need to glide the table and get the name


example:- here m taking the business requestor.


bussnesrequestor();


function bussnesrequestor(){


var grapp = new GlideRecord('change_request');


grapp.addQuery('u_business_requester',current.sys_id);


grapp.query();


if(grapp.next())


  {


  gs.log(current.u_business_requester);


}


}