Teams UI Macro Working Not properly

siva44
Tera Contributor

I have created UI Macro for teams integration it is working fine but whenever click the web teams app then it is showing message twice and whenever click the teams app then working fine

UI Macro script :

<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core"
xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<a class="btn-default;" id="${jvar_n}" onclick="invokeChat('${ref}');">
              <img src="teams.png" width="30"  title="Teams Chat" alt="${gs.getMessage('Click to open Teams chat')}" />
</a>
<script>
function invokeChat(reference) {



var firstname = g_form.getReference('caller_id').first_name;
var user = g_form.getReference('caller_id').email;
var subject = '&amp;amp;message=Hi ' + firstname + ', this is regarding your Incident ' + g_form.getValue('number') + ': ' + g_form.getValue('short_description');

var w = getTopWindow();
var url = prefix + user + subject;

w.open(url);
}
</script></j:jelly>
13 REPLIES 13

Hi @Rajesh Chopade1  whenever change the code then the subject line showing error

hi @siva44 

Remove the double cote and add single cote:

var subject = '&message=Hi '

Hi @Rajesh Chopade1  same error shwoing like below

Error at line (15) The reference to entity "message" must end with the ';' delimiter.

hi @siva44 

could you please try once '&amp;message'

Hi @Rajesh Chopade1  now it is showing error whenever open the incident