cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Resolver I
Resolver I

Can the undocumented but available functions be used?

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

1 ACCEPTED SOLUTION

Accepted Solutions

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/dateformattinginf...

View solution in original post

5 REPLIES 5

Power Apps
Power Apps

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

Power Apps
Power Apps

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 

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/dateformattinginf...

View solution in original post

Thanks @AnqiChen for your help!

 

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Users online (10,205)