Tag Archives: ms crm user domain name

Get Domain name for MS CRM 2011 User

Sometime we have requirement to get domain name for crm user, we can use SystemUser entity to get this information, you can use below rest code for the same: function GetServerURL() { var serverUrl = Xrm.Page.context.getServerUrl(); if (serverUrl.match(//$/)) { serverUrl = serverUrl.substring(0, serverUrl.length – 1); } return serverUrl; } function GetDomainName() { var UserID = Xrm.Page.context.getUserId(); var ODataPath = GetServerURL()… Read more »