Created
March 17, 2016 20:58
-
-
Save goyuix/7c0ac9bbebf55d6a2fbb to your computer and use it in GitHub Desktop.
Getting Time Zone For Current Dynamics CRM User
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (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