- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2014 06:41 AM
Hi,
I'm opening an email client window from a ui macro (the purpose is to have a mail icon next to a field).
To open the client I'm using this script :
var id = g_form.getUniqueValue(); popupOpenEmailClient("email_client.do?sysparm_target=incident&sysparm_table=incident&sysparm_sys_id=" + id + "&sys_uniqueValue=" + id); }
It works fine.
But now I want to set the value of the from, to ans subject field.
I've tried a lot of thing, but without any chance.
Do you know a way to set the value of these fields in the mail client popup?
Thanks a lot
rgds
Xavier
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2014 01:12 AM
Hi,
maybe it can help somebody, but I've managed to do it.
I've created a field called u_client_mail_type as a choice field with different velues in it : assigned_to, technical_correspondant, user.
For each value I've created a client mail template with this field and value in the condition.
And in the ui macro, I simply call the popupOpenEmailClient like that :
popupOpenEmailClient("email_client.do?sysparm_table=incident&sysparm_sys_id="+id+"&sysparm_target=incident&sys_target=incident&sys_uniqueValue="+id+"&sys_row=0&sysparm_encoded_record=&incident.u_client_mail_type=assigned_to&sysparm_stack=no");
the important part is the incident.u_client_mail_type=assigned_to at the end of the url, to select the template I need.
The field doesn't have to be on the form, it's just used in the template condition.
rgds
Xavier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2014 07:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2014 07:38 AM
Yes, but then I've another issue : as I need an Icon near the assigned to field and another Icon near the technician, how can I do the distinction between these 2 different mail template...
The only way I see to do this is to fill the fields from the url
but thanks for the answer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2017 07:59 AM
The ServiceNow Wiki content is no longer supported. Updated information about this topic is located here: Email Setup
Visit http://docs.servicenow.com for the latest product documentation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2014 01:12 AM
Hi,
maybe it can help somebody, but I've managed to do it.
I've created a field called u_client_mail_type as a choice field with different velues in it : assigned_to, technical_correspondant, user.
For each value I've created a client mail template with this field and value in the condition.
And in the ui macro, I simply call the popupOpenEmailClient like that :
popupOpenEmailClient("email_client.do?sysparm_table=incident&sysparm_sys_id="+id+"&sysparm_target=incident&sys_target=incident&sys_uniqueValue="+id+"&sys_row=0&sysparm_encoded_record=&incident.u_client_mail_type=assigned_to&sysparm_stack=no");
the important part is the incident.u_client_mail_type=assigned_to at the end of the url, to select the template I need.
The field doesn't have to be on the form, it's just used in the template condition.
rgds
Xavier