USD – window.IsUSD

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

One thought on “USD – window.IsUSD

  1. Pingback: USD – The Book | Microsoft Dynamics CRM and Unified Service Desk

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s