Dynamics CRM–getClientUrl


This article is to inform you that the function getServerUrl has been deprecated by the Dynamics CRM Product Team.

To replace it, you can use Xrm.Page.context.getClientUrl() method.

This will return following:

1. For IFD, you get following URL format:

2. While, when retrieving an Internal URL (http or https) the format is the following:

function getURL() {

var serverUrl = Xrm.Page.context.getClientUrl();



The following two screenshots show the results in an IFD Environment. The first retrieves the external the URL, whereas the second returns the internal one. If you notice, that’s the same URL that user’s type in IE’s navigation bar to access to CRM.




Best Regards

EMEA Dynamics CRM Support Team

Share this Blog Article on Twitter

Follow Us on Twitter

Comments (0)

Skip to main content