- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2016 02:35 AM
Hi,
I have created two email client template for incident. So I want to populate specific email client template in email client window.
How to add email client template parameter in popupOpenEmailClient?
Thanks,
Ravindra
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2016 04:36 AM
Hi Ravindra,
Hope you doing well .
For this what you can do is to have your custom client email icon set and that can be achieved by onLoad Client Script .
You can set the email client template based on any value for Incident form by setting the parameter in popupOpenEmailClient function like this :
popupOpenEmailClient("email_client.do?sysparm_table=incident&sysparm_sys_id="+id+"&sysparm_target=incident&sys_uniqueValue="+id+"&sys_row=0&sysparm_encoded_record=&incident.u_client_mail_type="+clientType+"&sysparm_stack=no");
Here, u_client_mail_type is a field on the basis of which I am setting the email client parameter.
You also have to add condition with the two Email Client Templates that you have in Email Client Template table.
For e.g. EmailClientTemplate1 with condition "u_client_mail_type=assigned_to"
& EmailClientTemplate2 with condition "u_client_mail_type=user"
I've tried this at my instance and it worked .Client Script is something like this :
In this I'm hiding the OOB Email Client icon and insert my customized one.
This will help you brother 🙂
PS - Please mark Helpful, Like, or Correct Answer if applicable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2018 10:49 PM
Hi Chetan, can you please take a look at my question?
https://community.servicenow.com/community?id=community_question&sys_id=6e30ab93dbf0ef44feb1a851ca961952&anchor=answer_826fa717dbf4a7482be0a851ca9619ec
Much appreciated.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2019 06:43 AM
Hello,
I have an requirement to write the customized code for the client where i need to do the validation when the user click on "Send" button in the email client template. Could you please help me on achieving this?
Thanks,
Priyanka R
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2017 04:18 AM
Hi Chetan,
I have a similar requirement. I want add the parameter for email client template specifically in popupOpenEmailClient. is there a way to embed the same? A syntax I should follow.
Thanks,
Urmilla
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2018 03:40 PM
Is this client template or just template because in client templates I dont see any condition ?