Within Unified Service Desk (USD) for Microsoft Dynamics CRM sometimes you might wish to create some functionality on a CRM form that only happens whilst in USD.
The can be achieved by using a window.IsUSD command in your JavaScript. This command will return true when in USD and false when not. Simples.
To demonstrate this I added a simple check to my on load event in my contact form. The simple code looked like this;
function onLoad() { if(window.IsUSD == true) { alert("This form is being loaded in USD!"); } else { alert("This form is being loaded NOT in USD!"); } }
When I load in USD I get this. And you can guess what happens when I’m not in USD.
Hopefully you can see how this simple command might be helpful. J
Update: Recently I have faced a challenge in using window.IsUSD withe the newer Unified Interface. If you hit problems, try “parent.window.IsUSD”. As that worked for me.
Pingback: USD – The Book | Microsoft Dynamics CRM and Unified Service Desk
Pingback: JavaScript – My Collection - Microsoft Dynamics CRM Community
Hi Neil,
Some times window.IsUsd comes as “Undefined” if I open it inside USD also. Can you please help me on this.
LikeLike
I have never had an issue with this! I think it might return undefined outside of USD. But inside I have not seen an issue. What version of USD are you using?
From your comment you mean it works some of the time? I haven’t observed any reliability issues. Is there any pattern to when it fails?
LikeLike