How to Use PCF Controls in Power Pages

In this post, we will look at how PCF Controls can be used in Power Pages. This is continuing on in our series on PCF Controls. First, let’s create a new Power Pages site, and we will add a form to the home page: Select New Form: And we will select our Account Dataverse form: We see the field which contains our PCF code components, which was added previously to … Continue reading How to Use PCF Controls in Power Pages

Using PCF Controls in Canvas Apps and Custom Pages

In previous posts, we created some Power Apps Component Framework (PCF) controls for use in Model-Driven Apps. In this post, we will look at how to use PCF controls in Canvas Apps and Custom Pages. First, let’s turn on a feature that allows us to use custom components in Canvas Apps. In the Power Platform Admin Center (https://admin.powerplatform.microsoft.com), select your environment, then Settings->Features and find the setting Power Apps component … Continue reading Using PCF Controls in Canvas Apps and Custom Pages

Building a Dataset PCF Control with Styling (Without React)

In previous posts, we created PCF field controls, which are controls that attach to Power Apps fields. In this post, we will look at how to create dataset PCF controls, which replace datasets in Power Apps and Dynamics 365. To do this, let’s create a new folder called SampleDatasetControl and initialize the project using the command. Note the -t dataset for the dataset template: pac pcf init -n SampleDatasetControl -ns carl … Continue reading Building a Dataset PCF Control with Styling (Without React)

Creating a Virtual PCF React Control with Fluent UI v8

In a previous post, we looked at how to create a sample PCF control. In this post, we will look at creating a React PCF control. The current templates for PCF Controls use Fluent UI v8. For v8 documentation, see https://developer.microsoft.com/en-us/fluentui#/controls/web . v8 controls use @fluentui/react. The latest version is Fluent UI v9. We can use v9 controls in our PCF controls, but it won’t use the out of the box template. … Continue reading Creating a Virtual PCF React Control with Fluent UI v8

Building a PCF Control that calls Context WebApi

Power Apps Component Framework, or PCF Controls, have capabilities to call WebApi operations. In this post, we will look at how to build a PCF control that calls the Context WebApi. In a previous post, we built a control that called the navigation features in a PCF control, as well as user settings. Let’s use that as a base to run some WebApi code. In looking at the context.webAPI, we … Continue reading Building a PCF Control that calls Context WebApi

Using Context Navigation and User Settings in PCF Controls

In this post, we will look at how to use context in PCF Controls. The context provides us with many features such as being able to call Power Apps and Dynamics 365 native functionality that we may normally access through JavaScript and the API. Being able to do this from within a PCF control is very useful for building our controls. First, let’s create a new PCF control called SampleXrmControl, … Continue reading Using Context Navigation and User Settings in PCF Controls

Creating a Textbox PCF Control

In our previous post, we created a simple PCF control that displayed an HTML label. In this post, we will look at how to make the control a text box. A very basic example of adding an HTML DOM input textbox can be found here. The code we will add to the init function in our index.ts file: var x = document.createElement(“INPUT”); x.setAttribute(“type”, “text”); x.setAttribute(“value”, “Hello World!”); container.appendChild(x); On saving, … Continue reading Creating a Textbox PCF Control

Building and Deploying your First PCF Control (without React)

PCF controls are custom built Power Apps Component Framework controls built by developers to extend the functionality of Microsoft Power Apps. In this post we will look at building these controls from scratch. First, let’s give a high level overview of PCF controls. Overview One of the first questions that comes us is which frameworks can you use to build these controls. Currently there are 2 templates of controls, Standard … Continue reading Building and Deploying your First PCF Control (without React)

PCF Create, Build, Deploy Cheat Sheet

The following are steps to create, build, and deploy PCF controls. You will need to install the Power Platform CLI and have msbuild (from Visual Studio). Aliases are used where possible. Usage: pac pcf init [–namespace] [–name] [–template] [–framework] [–outputDirectory] [–run-npm-install] –namespace The namespace for the component. (alias: -ns) –name The name for the component. (alias: -n) –template Choose a template for the component. (alias: -t) Values: field, dataset –framework … Continue reading PCF Create, Build, Deploy Cheat Sheet

Troubleshooting Power Platform Tools pac cli exception

Sometimes you may run into issues when running the Power Platform CLI, or pac cli. As an example, trying a simple pac auth create stopped working for me. The error produced was: Sorry, the app encountered a non recoverable error and will need to terminate. The exception details have been captured and will be forwarded to the development team, if telemetry has been enabled. Exception Id: 10ff1f33-efd2-42f8-b5bf-701af0bd5972, Exception Type: System.ComponentModel.Win32Exception … Continue reading Troubleshooting Power Platform Tools pac cli exception