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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Can the undocumented b...
Power Apps
Answered

Can the undocumented but available functions be used?

(0) ShareShare
ReportReport
Posted on by 200

Hello Experts, 

 

For one of the scenario, I need to retrieve the Organization Settings. 

 

While debugging the context, I stumbled across one of the property, that can provide me the required values. 

 

Like, I'd want to know the First Day of the Week, which can be obtained by using the below line of code as per the data seen at the time of debugging (please see screenshot) .

Code: context.formatting._currentCultureInfo.dateTimeFormat.firstDayOfWeek

Screenshot:

ConsoleDataPCFContext.png

 

@jopursle  @v-monli-msft  @v-xida-msft  @AnqiChen So, wanted to understand, can I use the above line of code? If not, then what would be the right approach to achieve it?

 

Thanks,

Sheldon

I have the same question (0)
  • RajYRaman Profile Picture
    270 on at
    It is based on the current user. So use https://docs.microsoft.com/en-us/powerapps/developer/component-framework/reference/usersettings to get this info.
  • MikeHuguet Profile Picture
    Microsoft Employee on at

    In general, if an API is not documented, then it is subject to change and usage of it is not supported nor recommended.

  • Hemant Gaur Profile Picture
    Microsoft Employee on at

    You should not use the undocumented APIs on the context object. For this particular case you can use WebAPI to retrive the value from the cds server and then cache it locally using setControlState for faster rendering for subsequent control load. 

     

    Hemant 

  • Verified answer
    AnqiChen Profile Picture
    Microsoft Employee on at

    It looks like it's supported in our typing file through:

    context.userSettings.dateFormattingInfo.firstDayOfWeek

     

    It's also documented

    https://docs.microsoft.com/en-us/powerapps/developer/component-framework/reference/dateformattinginfo

  • Sheldon Copper Profile Picture
    200 on at

    Thanks @AnqiChen for your help!

     

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard