- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2025 06:50 AM
Hello Community,
I'm setting up a custom UI Action button for opening Teams Chat directly from incident form and/or Service Operation Workspace . The logic behind is pretty simple, it just takes the email from the user on the form (caller.id) and just chain it with the teams URL https://teams.microsoft.com/l/chat/0/0?users=, nothing to fancy. Of course for the Workspace it's a bit more complicated, I had to use a script include to get the email. I did that on my PDI and it was working perfectly fine. But when I moved to one of our internal instances, I replicated the developemnt and I got to a point where the UI Actions are set up, it does not work sadly.
So I did some troubleshooting added additional steps to the code to check if it is running properly and what might be the issue, because on our internal instance, when you click on that button it does nothing. I mean if I add debugging steps hey are being picked up and executed but the teams url is not openining. First I thought it's becuase I was doing that in incognito window but I wrote a HTML page with similar button and hardcoded the users email and it works perfectly fine.
That makes me think that on SN level something is blocking that external URLs from being opened, I went through the documentation and checked in couple of places but I wasn't able to identify what's wrong. So I come to you, honorable people, maybe you tried something like that, and had better luck with making this work.
If any more details is needed, let me know !
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2025 12:40 AM - edited 04-11-2025 12:44 AM
Found the solution:
We used g_navigation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2025 06:53 AM
please share what have you configured so far?
what's the difference when you moved the code to other instance?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2025 07:17 AM
That's the UI Action I did, when I click on it in PDI:
And than the window about opening the link, after I click OK it is opening the teams URL in new TAB with a pop-up if I want to open the Microsoft Teams.
Let's just focus now on the form and leave the workspace out 😉
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2025 07:50 AM
the 2nd alert didn't come?
So it's issue with that encodeURIComponent
Try user.email.toString() in encodeURIComponent
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2025 12:16 AM - edited 04-11-2025 12:27 AM
They second alert came but had internal data in it. I will try your suggestion 🙂
*EDIT - same outcome, two alerts but no new tab opened