Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
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

  • Sheldon Copper Profile Picture
    200 on at
    Re: Can the undocumented but available functions be used?

    Thanks @AnqiChen for your help!

     

  • Verified answer
    AnqiChen Profile Picture
    on at
    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/dateformattinginfo

  • Hemant Gaur Profile Picture
    on at
    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 

  • MikeHuguet Profile Picture
    on at
    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.

  • RajYRaman Profile Picture
    270 on at
    Re: Can the undocumented but available functions be used?
    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.

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 89 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 72 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 71 Super User 2025 Season 1

Overall leaderboard