Need to create multiple email client templates to change_request table

Not applicable

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

15 REPLIES 15

Bjoiern Hesse
Tera Expert

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.