m crm 2015 Archives - Microsoft Dynamics 365 Blog http://microsoftdynamics.in/category/m-crm-2015/ Microsoft Dynamics CRM . Microsoft Power Platform Tue, 30 Dec 2014 09:34:00 +0000 en-US hourly 1 https://wordpress.org/?v=6.6.1 https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/04/cropped-Microsoftdynamics365-blogs.png?fit=32%2C32 m crm 2015 Archives - Microsoft Dynamics 365 Blog http://microsoftdynamics.in/category/m-crm-2015/ 32 32 176351444 Get the CRM Organization URL using javascript in ms crm 2011 , ms crm 2013 , ms crm 2015 http://microsoftdynamics.in/2014/12/30/get-the-crm-organization-url-using-javascript-in-ms-crm-2011-ms-crm-2013-ms-crm-2015/ Tue, 30 Dec 2014 09:34:00 +0000 http://microsoftdynamics.in/2014/12/30/get-the-crm-organization-url-using-javascript-in-ms-crm-2011-ms-crm-2013-ms-crm-2015/ Retrieve the CRM Organization URL with respect to the current domain name. For example, if you are browsing the CRM instance with IP, then the return value would be like this: http(s)://<IP>/<OrgName>If you are browsing with domain name, it would be like this: http(s)://<DomainName>/<OrgName>  function GetServerUrlRegExp(location) { var urlReg = new RegExp(/http[s]?://[0-9.:]+/[^/]+/); var ServerUrl = Xrm.Page.context.getServerUrl();...

The post Get the CRM Organization URL using javascript in ms crm 2011 , ms crm 2013 , ms crm 2015 appeared first on Microsoft Dynamics 365 Blog.

]]>

Retrieve the CRM Organization URL with respect to the current domain name. For example, if you are browsing the CRM instance with IP, then the return value would be like this: http(s)://<IP>/<OrgName>If you are browsing with domain name, it would be like this: http(s)://<DomainName>/<OrgName> 



function GetServerUrlRegExp(location) {
var urlReg = new RegExp(/http[s]?://[0-9.:]+/[^/]+/);
var ServerUrl = Xrm.Page.context.getServerUrl();
if (window.location.href.match(urlReg) != null) {
ServerUrl = window.location.href.match(urlReg).toString();
}
if (ServerUrl.match(//$/)) {
ServerUrl = ServerUrl.substring(0, ServerUrl.length - 1);
}
return ServerUrl;
}


SOURCE : JUST2CODE.IN

Subscribe to our YouTube channel : https://www.youtube.com/user/TheRussell2012

The post Get the CRM Organization URL using javascript in ms crm 2011 , ms crm 2013 , ms crm 2015 appeared first on Microsoft Dynamics 365 Blog.

]]>
2809