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.
]]>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.
]]>