in incident table need to show teams icon if user click on it then it should take to assigned person

srikanthr066535
Tera Contributor

in incident table need to show MS teams icon if user click on it then it should take us to assigned incident person Microsoft teams chat window

3 REPLIES 3

Bhavya11
Kilo Patron

Hi @srikanthr066535 ,

 

to achieved this you need to create ui macro

with below 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><img src="ms_tm.png" width = "25%" height = "25%" onClick = "userWindow('$(ref)')" tabindex="0" ></img></a>


	 <script>
        function userWindow(reference){
			 var prefix = 'https://teams.microsoft.com/l/chat/0/0?users=';
        var fname=g_form.getReference('caller_id').first_name;
		        var email=g_form.getReference('caller_id').email;
				var subject='&amp;amp; Message=Hi'+fname +'this is regaridng your incident'+g_form.getValue('number')+':'+g_form.getValue('short_description');
				 var w = getTopWindow();
				 var url = prefix + fname + subject;
				 w.open(url);
				
				        }
    </script>
</j:jelly>

 

add that ui macro to field right click on field then configure dictionary then add these attributes 'ref_contributions=UI Macro_name'

 

Please go through this video for more detailed information.

 

Please mark my answer correct & helpful, if it helps you
Thanks,
BK

 

 

Ankur Bawiskar
Tera Patron
Tera Patron

@srikanthr066535 

this link has the detailed explanation on how to do that

Service-Now – Microsoft Teams Integration 

sharing few other links

Teams Integration with Incidents - Start new chat from Incident form using Microsoft Deep Link and U... 

ServiceNow MicroSoft Teams Integration ..ish | Open MS Teams Chat from icon click  

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@srikanthr066535 

Thank you for marking my response as helpful.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader