718 Washington Ave. N. Suite #101
Minneapolis, MN 55401
View map and all Locations

Send us a message

JavaScript comes in very handy when working within Microsoft Dynamics CRM, and we have a lot of blogs on using JavaScript in CRM.


Starting from CRM 2011 UR 12, the getServerUrl (which returns the base server URL) and the getAuthenticationHeader method that was available pre-UR12 when referencing the Xrm.Page.context have been deprecated. These two methods are no longer supported in CRM 2013. So if you are referencing the getServerUrl and you are on UR12, and you are upgrading to UR12 or CRM 2013, you need to change all your JavaScript code to use getClientUrl instead.

A good way to make the JavaScript Version agnostic would be to check if the getClientUrl exists before using it.

For example:

Take note that getClientUrl does not append the slash character (‘/’) at the end of the URL.

So if you are currently using any JavaScript similar to the snippet below…

….make sure you change it to:

If this was helpful, you can also check out our other blogs and resources for Microsoft Dynamics CRM 2013.

Happy CRM’ing!

Avatar for JoeCRM


Joe CRM is a CRM superhero who runs on pure Microsoft Dynamics CRM adrenaline. As the face of PowerObjects, Joe CRM’s mission is to reveal innovative ways to use Dynamics CRM and bring the application to more businesses and organizations around the world.