Freigeben über


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:
https://OrganizationName.DomainName.com

2. While, when retrieving an Internal URL (http or https) the format is the following:
http(s)://CRMServerName.Domain.Com/OrganizationName

function getURL() {

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

alert(serverUrl);

}

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.

clip_image002

clip_image004

 

Best Regards

EMEA Dynamics CRM Support Team

Share this Blog Article on Twitter

Tweet

Follow Us on Twitter

Follow @MSDynCRMSupport