Ebook
Ebook
Danilo Capuano
www.capuanodanilo.com
Table of Contents
1. Introduction
2. Why PCF?
8. Community Resources
1
Introduction
Power Apps Component Framework (PCF)
Before
After
Power Apps Component Framework (PCF)
PCF History
Power Apps Component Framework (PCF)
✓ Solution aware
✓ Typescript
Go to https://nodejs.org
Choose latest versions available and download:
Node.js, NPM and Typescript
Typescript will install and the command line will prompt you
that Typescript has been successfully installed and will provide
you with the installed version
To see the list of the tsc commands and their usages, run the
tsc command in your command line:
.Net Framework 4.6.2 and Visual Studio Code
Debugging
npm start watch
Open Visual Studio Code, launch Terminal from top bar and
go to C:\PCF Controls\RecordGUID folder
Step 4
npm install
Step 5
From Visual Studio Code, open Index.ts file and add following
code to create the custom component
//global var
private _labelElement: HTMLLabelElement;
private _container: HTMLDivElement;
private _context: ComponentFramework.Context<IInputs>;
//init method
this._context = context;
this._container = container;
this._labelElement = document.createElement("label");
this._labelElement.setAttribute("id","lblGuid");
this._labelElement.innerHTML = "EMPTY";
this._container.appendChild(this._labelElement);
//updateView method
this._context = context;
//@ts-ignore
this._labelElement.innerHTML = context.page.entityId;
//getOutput method
return {};
Step 6
Step 7
npm start
MSBUILD /t:restore
and after:
MSBUILD
Create a new Text field on Entity (in this case Contact) and
after add it on main Form
Step 13
Step 14
XrmToolbox Plugin
Uses PCF CLI under the hood
Makes creating PCF Custom Control easy
Consolidates various commands in one button click
Auto-increment version numbers on build
Templates can be downloaded from PCF Gallery
With this tool you avoid all the manual steps seen in the
previous example
Other Links
Getting started
https://aka.ms/PCFBlog
https://aka.ms/PCFCanvasBlog
Documentation
https://aka.ms/PCFDocs
Community Forum
https://aka.ms/PCFForum
Feature Ideas
https://aka.ms/PCFIdea
Community components
https://aka.ms/PCFDemos
https://pcf.gallery
“Hope it helps and happy DynamicsPower'ing!”
DANILO CAPUANO
Do you like this eBook?
Do you think it's useful?
Danilo Capuano
www.capuanodanilo.com