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
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
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Community Member 2
HR-09070029-0 2
UllrSki 2