multiple Email client template for the same table

mmmarcellin
Kilo Explorer

 

Hello community, 

For one of my customer, 

I need using UI action on a incident record be able to call 2 different email client template on the same table . 

I tried on different version of instance (istanbul and kingston) . 

-First button the email template 'Agent_has_taken_Incident' and the second the other one .

find_real_file.png

My issue is when you call by clicking to one of the button you will always call the same email template and if you change directly on the url nothing happen you will have the same template with a different url .

the script : 

function showEmailTemplate(){
var id = g_form.getUniqueValue();
var name = g_form.getValue('name');
var url = 'email_client.do?sysparm_table=incident&sysparm_sys_id='+id+'&email_client_template=Agent_has_taken_Incident';
popupOpenEmailClient(url);


}

 

Someone know how to fix it ? 

Thank you in advance  ! 

4 REPLIES 4

mmmarcellin
Kilo Explorer

I find an OOTB way that is called quick message but I'm not able to use like the doc instruction "Use the following syntax: ${variable_name}." see the link https://docs.servicenow.com/bundle/istanbul-servicenow-platform/page/administer/notification/task/t_...

Every time I write something  with ${variable_name} on the quick message Istanbul version or Kingston, There is a bug ! 

The client template is blank.  More details here https://community.servicenow.com/community?id=community_question&sys_id=9951d32ddbdcdbc01dcaf3231f96...

 

Someone know how to fix it ? 

adityavishnu
Giga Expert

were you able to find solution for this?

Yes, I was able to find a solution. 

In fact is a bug. 

I resolve it by changing ${variable_name} to *{variable_name}*.

I create a business rules on the table sys_email to get all the fields and replace it by the correct value. 

 

 

 

 

 

 

I am facing the same issue, replacing with *{variable_name}* neither solves the issue nor prints the value.

Can you share the template you used

Thanks