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

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
Power Apps Staff AnqiChen
Power Apps Staff

Re: Can the undocumented but available functions be used?

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
rajyraman
Level: Powered On

Re: Can the undocumented but available functions be used?

Highlighted
Power Apps Staff MikeHuguet
Power Apps Staff

Re: Can the undocumented but available functions be used?

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 Staff HemantG
Power Apps Staff

Re: Can the undocumented but available functions be used?

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 

Power Apps Staff AnqiChen
Power Apps Staff

Re: Can the undocumented but available functions be used?

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

Re: Can the undocumented but available functions be used?

Thanks @AnqiChen for your help!

 

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Users online (6,390)