web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to retrieve User's local time , personal settings , date format in MS CRM using Javascript Web API

(0) ShareShare
ReportReport
Posted on by

Just to share info while i was facing this issue. 

I went through below URL which was very old but useful 

bds-experts.com/get-user-personal-settings

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at
    RE: How to retrieve User's local time , personal settings , date format in MS CRM using Javascript Web API

    Note : the entity which has been used in above URL was  "usersettings" but now it has been changed to "usersettingscollection" .

    You can web api to retrieve the date format , or time settings.

    Entity name : usersettingscollection

    attributes :dateseparator , dateformatstring,timeformatstring,timeseparator

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: How to retrieve User's local time , personal settings , date format in MS CRM using Javascript Web API

    Mark my answer as verified :)

    Code for help :

    DateFormatPicker: function () {

           var entityLogicalName = "usersettingscollection";

           var userId = Xrm.Page.context.getUserId();

           var query = "$select=dateformatstring&$filter= systemuserid eq " + userId.replace(/[{}]/g, "") + "";

           SDK.WEBAPI.retrieveMultipleRecords(entityLogicalName, query,

               function (results) {

                   if (results.value.length > 0) {              

                      var date=results.value[0].dateformatstring;

    alert(date);

                   }

                   else {

                       Xrm.Page.ui.clearFormNotification();

                   }

              },

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans