"тнιѕ вℓσg ¢συℓ∂ ѕανє уσυя мσηєу ιƒ тιмє = мσηєу" - ∂.мαηנαℓу

Sunday 6 October 2013

How to get the Base URL value in CRM 2013 using javascript OR How to get the Server URL in CRM 2013 using javascript

With reference to CRM 2013 SDK, please note that the js method context.getServerUrl() which was widely used in CRM 2011 is deprecated in CRM 2013.  So we need to use the following method instead to retrieve the base URL value. 

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

The values Returned:


Client
Value
Microsoft Dynamics CRM (on-premises)
http(s)://server/org
Microsoft Dynamics CRM Online
https://org.crm.dynamics.com
Microsoft Dynamics CRM for Outlook with Offline Access when offline
http://localhost:2525

Ref: ( CRM 2013 SDK )

No comments:

Post a Comment