Notifications
Announcements
No record found.
Does anyone know if, via javascript, I can detect whether the crm page is hosted in a browser or in Unified Service Desk?
*This post is locked for comments
Hi Kyle
I looked into this a few months ago, below is how I managed to do so.
community.dynamics.com/.../193827
Having said that, I just noticed this article by Niel Parkhurst about using window.IsUSD but I haven't tried that method.
community.dynamics.com/.../usd-window-isusd
Regards
Brad
Hi Brad,
Thanks for the links. I just gave Niel's script a test and it works. I was skeptical at first, because searching for the window's "IsUSD" value via a browser console is fruitless; it's undefined when you're not in USD. But when rendering a CRM form in USD, indeed
window.IsUSD = true
For anyone coming across this post, here is Niel's simple function:
function onLoad() { if(window.IsUSD == true) { alert("This form is being loaded in USD!"); } else { alert("This form is being loaded NOT in USD!"); } }
Hi Kyle,
I am also trying to run this script in my webresource to detect whether the hosted control is hosted in browser or in USD, but everytime i am getting the wrong result means undefined value.
Please suggest some idea to resolve the issue.
I think the version of the USD solution and the USD client you're using both come into play. I've had this not work in the past, on older versions of both the solution and client. Maybe consider upgrading either your solutions or client version.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2