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 / using getResourceStrin...
Power Apps
Answered

using getResourceString to retieve resx file over an pcf-component

(0) ShareShare
ReportReport
Posted on by 21

Hello,

is there a way to retrieve Resx-Webresources over PCF.
I've tried to achieve this via the "getResourceString"-methode over the XRM object.
I have also added the following feature-usage configuration:

<uses-feature name="Utility.getResourceString" required="true" />
... but even though the methode is available that also didn't help.
All i get is a not found error...

I have the same question (0)
  • Verified answer
    Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at

    Hi @TheTruePowerDev , 

     

    The feature for Utility is called only "Utility". Here are the examples: https://learn.microsoft.com/en-us/power-apps/developer/component-framework/manifest-schema-reference/feature-usage?WT.mc_id=BA-MVP-5004107

    If you do that, you get access to context.utils: https://learn.microsoft.com/en-us/power-apps/developer/component-framework/reference/context#utils, but you have only 3 methods there: getEntityMetadata, hasEntityPrivilege, lookupObjects: https://learn.microsoft.com/en-us/power-apps/developer/component-framework/reference/utility?WT.mc_id=BA-MVP-5004107

     

    BUT, in PCF sdk there is a Resources namespace: https://learn.microsoft.com/en-us/power-apps/developer/component-framework/reference/resources?WT.mc_id=BA-MVP-5004107

    You have there getResource and getString methods. This will work with the resources you've added to your PCF manifest, like resx, css,  images, and that's the supported way: https://learn.microsoft.com/en-us/power-apps/developer/component-framework/manifest-schema-reference/resources?WT.mc_id=BA-MVP-5004107

     

    So, for accessing resx packed inside your PCF, you can use these resources methods. The problem with that: you have to deliver the resx inside the PCF package. You can find more details about localizations for instance in Ivan's blog:  https://dynamicsninja.blog/2020/01/21/pcf-localization/

     

    If you try to access resx WebResources that are not part of the PCF, you'll need some hacks.In my opinion that's not really supported.

    Using the Xrm object inside the PCF is not supported.

    You may try to access the WebResource address on your own, but I'm not sure if that will work in all cases/devices/apps.

    You could try to build the url on your own, but you probably won't be able to access the cached version of the WebResource.

     

    Hope this helps!

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 627

#3
Valantis Profile Picture

Valantis 598

Last 30 days Overall leaderboard