High severity vulnerability in pcf-scripts package due to dependency on xml2js
Microsoft | Scott Durow's PowerPlatform Blog
by Scott Durow
1y ago
Have you noticed recently that when you run npm install on your PCF projects, you get a high severity vulnerabilities error (or maybe you were spammed by the GitHub dependabot like I was)? Luckily, it's not necessarily a reason to panic! As of the time of writing this (14th April 2023), there is currently a vulnerability in the xml2js package which pcf-scripts depends on, so if you run npm audit, you will see something like: # npm audit report xml2js <0.5.0 Severity: high xml2js is vulnerable to prototype pollution - https://github.com/advisories/GHSA-776f-qx25-q3cc No fix ava ..read more
Visit website
Power Fx delegation of 'in' operator against Davaverse
Microsoft | Scott Durow's PowerPlatform Blog
by Scott Durow
1y ago
Delegation of queries in Canvas Apps/Custom Pages has long been a troublesome topic and we are always looking out for the triangle of doom, or the double blue underline of eternal stench (well, it is Halloween soon!) I try to keep a close eye on the connector delegation support table in the official documentation for any changes and additions. Part of what I love about the Power Platform is that new features are constantly being released, often without fanfare!  Here is the current delegation support at the time of writing (for posterity from the docs): Item Number [1] Text [2] C ..read more
Visit website
How to update multiple records in a model-driven app grid using Power Fx commanding
Microsoft | Scott Durow's PowerPlatform Blog
by Scott Durow
1y ago
If you wanted to add a button to a command bar to perform an update on multiple records in a grid, you can easily create a formula that results in slow performance caused by multiple grid refreshes. This post outlines, the most performant way of applying updates to multiple records from a Power Fx command button. Step 1 - Add your button Inside the modern command bar editor, add a button to the Main Grid or Sub Grid command bars of the Account entity. Step 2 - Set the Visibility rule Any buttons on a grid that apply to selected records will only become visible if you provide a visibility rule ..read more
Visit website
How to convert a pcf code component to a virtual control
Microsoft | Scott Durow's PowerPlatform Blog
by Scott Durow
2y ago
The long-awaited 'virtual control' feature is finally in preview which means you can start to try converting your controls to be virtual - but what does this actually mean? What are virtual code component PCF controls? Virtual controls are probably better named React code components since this is their defining feature. Using them has the following benefits: Uses the host virtual DOM - The code component natively is added to the hosting apps 'Virtual DOM' instead of creating its own. This has performance benefits when you have apps that contain many code components. See more about t ..read more
Visit website
Watch out for PCF (code-components) sort silently failing
Microsoft | Scott Durow's PowerPlatform Blog
by Scott Durow
2y ago
One of the biggest causes of unexpected bugs in canvas apps is the delegation of queries. For instance, if you want to sort by the owner of an account, you can use the Power Fx query: Sort(Accounts,'Created By'.'Full Name', Ascending) You will get a delegation warning on this since the sorting will only happen in memory and not on the server. This means if you have the delegation limit set to 500, only the first 500 records will be sorted instead of sorting the entire dataset on the server-side. This may not show up whilst you are developing the app, but it might not work as expected in prod ..read more
Visit website
'ComponentFramework' is not defined - eslint with pac pcf init
Microsoft | Scott Durow's PowerPlatform Blog
by Scott Durow
2y ago
At some point, over the last few months, a change was introduced to the Power Platform CLI such that if you have the ESLint VS Code add-in installed, after using pac pcf init, you may see an error in VS code: 'ComponentFramework' is not defined.eslint(no-undef) This might look something like this in the index.ts file: The reason for this is that the pac pcf init template now includes an .eslintrc.json however, it is configured to use JavasScript rules rather than TypeScript ones. To fix this you simply need to edit the .eslintrc.json  file. Find the extends section and replace the ..read more
Visit website
Modernized Business Units - perhaps finishing off something that was always meant to be!
Microsoft | Scott Durow's PowerPlatform Blog
by Scott Durow
2y ago
You might have seen the announcement about Modernized Business Units in Microsoft Dataverse. I made a video on it as well to show you the opportunities that it opens up when designing Microsoft Dataverse security models for both model-driven and canvas apps. In summary, the change can be broken down into two parts: You can now assign a Security Role from a business unit outside of the user's own business unit - this allows users to access records in different business units as though they were a member of that business unit. This could replace more traditional approaches that might have ..read more
Visit website
Error Handling Update/Patch in CommandBar Power Fx buttons
Microsoft | Scott Durow's PowerPlatform Blog
by Scott Durow
2y ago
As you know, I'm 'super excited'* about the new Power Fx low-code Command Bar buttons (First Look Video) (Ribbon Workbench compared to Power Fx) - especially the ease at which you can update multiple records in a grid. To allow the user to select a number of records on a grid, and then perform an operation on each, in turn, would have taken plenty of pro-code TypeScript/JavaScript before but now can be turned into a simple ForAll expression.  * That one's for you @laskewitz The one thing that always gets left out - Error Handling! It's easy to assume that every operation will always succe ..read more
Visit website
Swap out old code-components with new using the Power Platform CLI
Microsoft | Scott Durow's PowerPlatform Blog
by Scott Durow
2y ago
If you have canvas apps that use code components then you will be used to the hard link between the namespace of the code component and the canvas apps that use it. Also, if you have your canvas apps in a solution, then there are now solution dependencies added for the code components used to ensure that they are installed before you import the solution to a target environment. You can read more about code component ALM in the Microsoft docs. How do we swap out components easily? Occasionally, you may need to change the namespace of a control (or perhaps change a property name) but i ..read more
Visit website
Canvas app code component error "Couldn't import components"
Microsoft | Scott Durow's PowerPlatform Blog
by Scott Durow
2y ago
If you are developing code components (PCF) for canvas apps you'll be used to using the 'Get more components' panel. When adding the code-component to the canvas app, occasionally you will receive the somewhat unhelpful error: Couldn't import components  There are no more details provided in the expanded down arrow area: I'm put this here for my future self (who always seems to forget about this issue) and anyone else who comes across this error. The cause is usually because you have a property-set that has the same name as an in-build property or one of your own (e.g. Enabled/Selec ..read more
Visit website

Follow Microsoft | Scott Durow's PowerPlatform Blog on FeedSpot

Continue with Google
Continue with Apple
OR