Skip to content

Instantly share code, notes, and snippets.

@goyuix
Created March 17, 2016 20:58
Show Gist options
  • Select an option

  • Save goyuix/7c0ac9bbebf55d6a2fbb to your computer and use it in GitHub Desktop.

Select an option

Save goyuix/7c0ac9bbebf55d6a2fbb to your computer and use it in GitHub Desktop.
Getting Time Zone For Current Dynamics CRM User
(function($){
var serverUrl = Xrm.Page.context.getServerUrl();
var orgDataService = serverUrl + "/XRMServices/2011/OrganizationData.svc";
var systemUserId = Xrm.Page.context.getUserId();
$.getJSON(orgDataService + "/UserSettingsSet(guid'" + systemUserId + "')").then(function(data){
// do something with data.d.TimeZoneBias
})
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment