We're using the google places api for an address autocomplete pcf control. My current issue is that when I open the form from an overview the onload function of the script is not getting called and if then only in rare cases. If I reload the form the onload function is hit everytime.
@HemantG Please delete. I relied on a variable from init function which doesn't get populated everytime as context parameters are still null especially not populated when opening a record from an overview. It has nothing to do with loading external libraries.
Hi @tvd_nzi ,
Usually you don't inject script tags in PCF, but import the scripts and use them inside index.ts.
Maybe using something like googleapis npm package (I didn't tried it out): https://www.npmjs.com/package/googleapis
I remember about another thread regarding the google maps. Maybe it helps, since the problem seems to be similar: https://powerusers.microsoft.com/t5/Power-Apps-Pro-Dev-ISV/pcf-1022-Error-Control-source-code-declar...
Hope it helps!
Hi @DianaBirkelbach , thanks for your response. These are third party npm packages which do the script loading dynamically. If these packages don't exist at all how would you load hosted scripts?
Hi @tvd_nzi ,
I've seen an example in the PCF docs: the Map component: https://docs.microsoft.com/en-us/powerapps/developer/component-framework/sample-controls/map-control...
Basically it uses an Iframe.
Didn't tried this out nether...but maybe it still helps...
Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.
Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.
The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.
We are excited to announce a new way to share your ideas for Power Apps!