PCF (Power Apps Component Framework) lets you ship a custom React or vanilla TypeScript control to a Dynamics 365 form. It is the right tool for specific UX needs and a costly distraction for the rest. Here is the decision matrix.
When PCF is the right answer
- A native control does not exist for the data type or interaction (multi-select with rich filtering, color picker, signature pad, custom map widget).
- The control will be reused across many forms or many environments.
- The behavior cannot be achieved with a JS web resource because it needs to render its own DOM tree (charts, complex input grids).
When PCF is the wrong answer
- The need is “show this number in red if negative.” Use a JS web resource.
- The need is “embed this third-party widget once on one form.” Use an iframe inside a web resource.
- The need is “rebuild the entire form layout.” Use embedded canvas instead.
- The team has no React or TypeScript experience. The learning curve is real.
The build cost
A simple PCF control (custom rating widget) takes 2-3 days to build, package, test in dev, and deploy. A complex one (embedded grid with editing) is 4-8 weeks. Add 25% for ongoing maintenance against framework upgrades.
The deployment story
PCF controls deploy as components inside solutions. The build is a Node.js + dotnet pipeline:
npm install
npm run build
pac pcf push --publisher-prefix new
The pac pcf push command auto-creates a temporary solution. For production, package into a real solution and promote via standard ALM.
React PCF: the version trap
PCF supports React via the platform-provided React (currently version 16.8 or 17 depending on the runtime). Bringing your own React version is allowed for “virtual” PCF controls but doubles bundle size. Use platform React unless you need a feature only newer React supports.
Performance pitfalls
Each PCF control on a form adds bundle download and initialization time. Three controls on one form can add 800ms to load. Mitigate by:
- Lazy-loading non-default tabs that contain PCF controls.
- Bundling with tree-shaking (
webpack --mode=production). - Sharing libraries across controls via externalized dependencies.
Marketplace alternatives
The Microsoft PCF Gallery and AppSource have hundreds of free PCF controls. Before building, check if someone solved this already. The XrmToolbox community maintains an unofficial gallery with quality reviews.
Security considerations
PCF controls run in the user’s browser context with full access to the Xrm object. A malicious or buggy control can call any Web API the user can. Audit third-party PCF controls’ source before deploying. Treat them like NPM dependencies.
What to do this week
List your custom PCF controls. For each, ask: was this strictly necessary, and is it still maintained against the latest framework? Drop the obsolete ones; they are technical debt growing interest.