Need to create multiple email client templates to change_request table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2022 03:50 AM
Hi,
We have a requirement to define multiple email client templates to change_request table and trigger them using UI action on a change record to be able to call 3 different email client template on the same table . But when I am using ui action everytime same template is opening.
This can be achieved by Quick messages but the problem is we cannot define subject and other details.
Is this possible to achieve using email client template.
Regards,
Surabhi
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
This solution worked for me.
1. Add a field ie. template_name to the task
2 Add a condition for this field to each template
iTemplate one -> "template_name" = "First"
Template two: -> "template_name" = "Second"
...
3. Add a UI Action for each dedicated template you want to open the email popup.
Make sure client is checked and you call "showEmail()" in Onclick
function showEmail(){
g_form.setValue('template_name','First');
// g_form.setValue('template_name','Second'); -> this code for the 2nd ui action
emailClientOpenPop(
null,
false,
null,
null,
'');
g_form.setValue('template_name','');
}
That did the magic for me. Haven't checked if the field must be visible on the form, I misused for testing an existing field already on the form.