SlideShare a Scribd company logo
Getting Started
with PCF
Custom
Control
A PRO-DEV TOOL WHICH ENHANCES
CREATIVITY
Danish Naglekar
 CREATOR, PCF CUSTOM CONTROL BUILDER
 TECHNICAL ARCHITECT @ AKA ENTERPRISE
SOLUTIONS
 BLOGGER, VLOGGER
@DanzMaverick
/danish.naglekar
/Danz-Maverick
Dynamics with Danish
danishnaglekar.wordpress.com
Overview of PCF Custom Control
 Provides enhanced user experience
 Developers get ability to utilize PowerApps capabilities to it’s fullest
 Access to cool technologies like Node, TypeScript, React, Office UI Fabric, Signal R, Cognitive services
and many more
 Support both Model-driven App as well as Canvas App
Web Resources vs Custom Controls
Web Resources (HTML)
✓ Context not natively available
✓ Loads after all form components are loaded
✓ Performance issues
✓ May not provide seamless experience
✓ Multiple files needs to be maintained and
dependencies needs to be created
✓ Need to implement lifecycle management
✓ May not be easy to reuse
✓ Do not have access to contextual or metadata
✓ No access to Web Api through context
✓ Difficult to use device features
✓ Explicitly handling needed for responsive design
Custom Controls
✓ Rendered as part of context
✓ Loads at same time as other form component
✓ Optimized performance
✓ Provides seamless experience
✓ One single solution file created bundled with HTML, CSS,
TypeScript
✓ Automatically handles component lifecycle
✓ Reusability
✓ Easy access to contextual data and metadata
✓ Web Api Access through context
✓ Usage of device features like camera, location, etc.
✓ Renders with responsive UX
Preparing your dev environment
1. Install node.js and npm
2. Install .Net Framework 4.6.2
3. Install Visual Studio Code / Visual Studio 2017
4. Install PowerApps CLI
PCF Project Structure
Manifest File
Event execution
(index.ts)
constructor
init
updateView
Empty constructor variable
initialization
Initializes control. Can invoke remote
server calls or initialize something
else
Invoked when property values or
global values are changed
Event execution
(index.ts)
notifyOutputChanged
getOutputs
updateView
Can be called explicitly
Invoked when the value in the
control is changed
Invoked when property values or
global values are changed
Build PCF Project
Create folder
Install dependencies
Initialize PCF Project
Edit Manifest file
Implement component
logic
Add styling (css)
Build Component
Add resources
Test
Component
pac pcf init
You specify your namespace,
control name & component
type
npm install
Installs all required
dependencies
Edit XML file
Contains components
manifest information
Edit index.ts file
Write your logic using
TypeScript, React, etc.
Edit css file
Add design to your control
using CSS
Edit resources file
This is optional if you
want to add language
support
npm run build
Build component
COMPLETE
Libraries & Frameworks
Configuration
Community
 https://pcf.gallery
 One stop-shop for all community-
built PCF Controls
 Share Ideas
 Developed by Guido Preite
 XrmToolbox Plugin
 Makes creating PCF Custom Control easy
 Uses PCF CLI under-the-hood
 Consolidates various commands in one
button click
 Auto-increment version numbers on build
 Templates can be downloaded from PCF
Gallery
PCF Gallery PCF Custom Control Builder
Demo
Time
http://bit.ly/2Q8G3J1
Good to know
 React or any 3rd party libraries you bundle will be loaded into host page for every
instance of the control
 PCF is in experimental preview for Canvas App
 Canvas apps only support field type code components
 Good to increment version of component and solution before you deploy in CDS
 Pay attentions to feature-usage section in Manifest file before using those features
Important Links
• PowerApps Component Framework Overview - http://bit.ly/2qNMOFz
• Create and build Code components - http://bit.ly/2CFz6ay
• PCF Gallery - https://pcf.gallery
• PowerApps Component Framework Blog - http://bit.ly/2K36ZGn
• PCF Custom Control Builder Blog - http://bit.ly/2K849zQ
Questions
and
Answers

More Related Content

PPT
User Story Mapping (2008)
PDF
Summit Australia 2019 - PowerApps Component Framework (PCF) - Andrew Ly & Aun...
PPTX
Power Apps Component Framework - Dynamics Power! 365 Paris 2019
PDF
Innovation morning power platform
PDF
Powerapps & Flow
PPTX
Model Driven PowerApps
PPTX
Intro to power apps
PDF
An Introduction to Microsoft Flow
User Story Mapping (2008)
Summit Australia 2019 - PowerApps Component Framework (PCF) - Andrew Ly & Aun...
Power Apps Component Framework - Dynamics Power! 365 Paris 2019
Innovation morning power platform
Powerapps & Flow
Model Driven PowerApps
Intro to power apps
An Introduction to Microsoft Flow

What's hot (20)

PPTX
PowerApps Deep Dive
PPTX
An introduction to microsoft power apps
PPTX
Einstein bots
PPTX
Managing and supporting PowerApps & Flow at scale by Daniel Laskewitz
PPTX
Canvas and Model Driven Apps
PPTX
Power apps presentation
PPTX
Microsoft power platform
PPTX
How to choose between SharePoint lists, SQL Azure, Microsoft Dataverse with D...
PPTX
Bring together SPFx Solutions in SharePoint and MS Teams​
PPTX
Power Platform Governance Webinar
PPTX
Power platform Bootcamp Bulgaria 2021 - Power Platform Security
PPTX
The People's Innovation Platform - Microsoft Power Platform
PPTX
Microsoft Power Apps 101 : Build your application with power apps
PPTX
Microsoft power virtual agents
PPS
Microsoft dynamics-crm-online-overview-ppt
PPTX
Lightning web components
PPTX
Lightning Web Component - LWC
PPTX
Introduction to Microsoft ERP Dynamics 365 for finance and operation
PPTX
Power Platform (Power Automate)
PDF
Salesforce Service cloud 3 presentation
PowerApps Deep Dive
An introduction to microsoft power apps
Einstein bots
Managing and supporting PowerApps & Flow at scale by Daniel Laskewitz
Canvas and Model Driven Apps
Power apps presentation
Microsoft power platform
How to choose between SharePoint lists, SQL Azure, Microsoft Dataverse with D...
Bring together SPFx Solutions in SharePoint and MS Teams​
Power Platform Governance Webinar
Power platform Bootcamp Bulgaria 2021 - Power Platform Security
The People's Innovation Platform - Microsoft Power Platform
Microsoft Power Apps 101 : Build your application with power apps
Microsoft power virtual agents
Microsoft dynamics-crm-online-overview-ppt
Lightning web components
Lightning Web Component - LWC
Introduction to Microsoft ERP Dynamics 365 for finance and operation
Power Platform (Power Automate)
Salesforce Service cloud 3 presentation
Ad

Recently uploaded (20)

PDF
Parts of Speech Prepositions Presentation in Colorful Cute Style_20250724_230...
PPTX
English-9-Q1-3-.pptxjkshbxnnxgchchxgxhxhx
PPTX
Project and change Managment: short video sequences for IBA
PPTX
The spiral of silence is a theory in communication and political science that...
PPTX
PHIL.-ASTRONOMY-AND-NAVIGATION of ..pptx
PDF
oil_refinery_presentation_v1 sllfmfls.pdf
PPTX
Tour Presentation Educational Activity.pptx
PPTX
S. Anis Al Habsyi & Nada Shobah - Klasifikasi Hambatan Depresi.pptx
PDF
Presentation1 [Autosaved].pdf diagnosiss
PPTX
fundraisepro pitch deck elegant and modern
PDF
natwest.pdf company description and business model
PPTX
Tablets And Capsule Preformulation Of Paracetamol
PPTX
Primary and secondary sources, and history
PPTX
nose tajweed for the arabic alphabets for the responsive
PPTX
Impressionism_PostImpressionism_Presentation.pptx
DOC
学位双硕士UTAS毕业证,墨尔本理工学院毕业证留学硕士毕业证
PDF
Swiggy’s Playbook: UX, Logistics & Monetization
PPTX
Anesthesia and it's stage with mnemonic and images
PPTX
Learning-Plan-5-Policies-and-Practices.pptx
PPTX
Self management and self evaluation presentation
Parts of Speech Prepositions Presentation in Colorful Cute Style_20250724_230...
English-9-Q1-3-.pptxjkshbxnnxgchchxgxhxhx
Project and change Managment: short video sequences for IBA
The spiral of silence is a theory in communication and political science that...
PHIL.-ASTRONOMY-AND-NAVIGATION of ..pptx
oil_refinery_presentation_v1 sllfmfls.pdf
Tour Presentation Educational Activity.pptx
S. Anis Al Habsyi & Nada Shobah - Klasifikasi Hambatan Depresi.pptx
Presentation1 [Autosaved].pdf diagnosiss
fundraisepro pitch deck elegant and modern
natwest.pdf company description and business model
Tablets And Capsule Preformulation Of Paracetamol
Primary and secondary sources, and history
nose tajweed for the arabic alphabets for the responsive
Impressionism_PostImpressionism_Presentation.pptx
学位双硕士UTAS毕业证,墨尔本理工学院毕业证留学硕士毕业证
Swiggy’s Playbook: UX, Logistics & Monetization
Anesthesia and it's stage with mnemonic and images
Learning-Plan-5-Policies-and-Practices.pptx
Self management and self evaluation presentation
Ad

[Portland 365Sat] PCF Custom Controls

  • 1. Getting Started with PCF Custom Control A PRO-DEV TOOL WHICH ENHANCES CREATIVITY
  • 2. Danish Naglekar  CREATOR, PCF CUSTOM CONTROL BUILDER  TECHNICAL ARCHITECT @ AKA ENTERPRISE SOLUTIONS  BLOGGER, VLOGGER @DanzMaverick /danish.naglekar /Danz-Maverick Dynamics with Danish danishnaglekar.wordpress.com
  • 3. Overview of PCF Custom Control  Provides enhanced user experience  Developers get ability to utilize PowerApps capabilities to it’s fullest  Access to cool technologies like Node, TypeScript, React, Office UI Fabric, Signal R, Cognitive services and many more  Support both Model-driven App as well as Canvas App
  • 4. Web Resources vs Custom Controls Web Resources (HTML) ✓ Context not natively available ✓ Loads after all form components are loaded ✓ Performance issues ✓ May not provide seamless experience ✓ Multiple files needs to be maintained and dependencies needs to be created ✓ Need to implement lifecycle management ✓ May not be easy to reuse ✓ Do not have access to contextual or metadata ✓ No access to Web Api through context ✓ Difficult to use device features ✓ Explicitly handling needed for responsive design Custom Controls ✓ Rendered as part of context ✓ Loads at same time as other form component ✓ Optimized performance ✓ Provides seamless experience ✓ One single solution file created bundled with HTML, CSS, TypeScript ✓ Automatically handles component lifecycle ✓ Reusability ✓ Easy access to contextual data and metadata ✓ Web Api Access through context ✓ Usage of device features like camera, location, etc. ✓ Renders with responsive UX
  • 5. Preparing your dev environment 1. Install node.js and npm 2. Install .Net Framework 4.6.2 3. Install Visual Studio Code / Visual Studio 2017 4. Install PowerApps CLI
  • 8. Event execution (index.ts) constructor init updateView Empty constructor variable initialization Initializes control. Can invoke remote server calls or initialize something else Invoked when property values or global values are changed
  • 9. Event execution (index.ts) notifyOutputChanged getOutputs updateView Can be called explicitly Invoked when the value in the control is changed Invoked when property values or global values are changed
  • 10. Build PCF Project Create folder Install dependencies Initialize PCF Project Edit Manifest file Implement component logic Add styling (css) Build Component Add resources Test Component pac pcf init You specify your namespace, control name & component type npm install Installs all required dependencies Edit XML file Contains components manifest information Edit index.ts file Write your logic using TypeScript, React, etc. Edit css file Add design to your control using CSS Edit resources file This is optional if you want to add language support npm run build Build component COMPLETE
  • 13. Community  https://pcf.gallery  One stop-shop for all community- built PCF Controls  Share Ideas  Developed by Guido Preite  XrmToolbox Plugin  Makes creating PCF Custom Control easy  Uses PCF CLI under-the-hood  Consolidates various commands in one button click  Auto-increment version numbers on build  Templates can be downloaded from PCF Gallery PCF Gallery PCF Custom Control Builder
  • 15. Good to know  React or any 3rd party libraries you bundle will be loaded into host page for every instance of the control  PCF is in experimental preview for Canvas App  Canvas apps only support field type code components  Good to increment version of component and solution before you deploy in CDS  Pay attentions to feature-usage section in Manifest file before using those features
  • 16. Important Links • PowerApps Component Framework Overview - http://bit.ly/2qNMOFz • Create and build Code components - http://bit.ly/2CFz6ay • PCF Gallery - https://pcf.gallery • PowerApps Component Framework Blog - http://bit.ly/2K36ZGn • PCF Custom Control Builder Blog - http://bit.ly/2K849zQ

Editor's Notes

  • #2: Welcome to todays session on “Getting started with PCF Custom Control”. A new Pro-Dev tool
  • #3: My name is Danish Naglekar and I am the creator of PCF Custom Control Builder. I am a technical architect working for AKA Enterprise Solutions I write blogs and create videos through my YouTube channel to share my knowledge with the community
  • #4: In every single project we run into certain requirement where we wish the control was OOB and we end up using some workaround like writing HTML webresource code. Now, with PCF all those wishes came true. If you have already used some of the controls that Microsoft had shipped in their earlier release like Flip Switch or Knob Control you might have seen the power of these custom control providing an enhanced user experience. Also, good news for the developers is you get to use lots of cool technologies natively which was not possible earlier. These components can be used on both Model-driven and Canvas App. Here, you can see some of the custom controls built by the community.
  • #5: As you can see there are lot of differences between a Web Resource and Custom Control. Custom Control has more positive side then Web Resources. Like context is not readily available in HTML we have been using windows.parent but in Custom control it is readily available. One of the important point we all have been facing issues with using HTML is it loads after all form elements which not only causes performance issues but also is not a seamless experience for the users. When we create HTML file we usually use multiple javascript files and sometimes CSS for styling. We must then configure dependencies and make sure when we deploy we include those dependent components which makes it harder to implement lifecycle management. Unless you write code in a very configurable way – which btw is not an easy thing to do – most HTML components are not reusable but Custom Controls are designed for reusability. Custom controls have access to contextual data, metadata & webapi which is not the case with HTML webresources. If you want to use any device features Custom control supports it OOB. HTML unless you explicitly write code to be responsive it won’t be but Custom Controls are responsive making it great for UX.
  • #6: First need to install node.js along with npm. Recommended is Long Term Support or in short LTS Then you need to install .Net Framework 4.6.2 You can use either Visual Studio 2017/19 or Visual Studio Code And lastly you need PowerApps CLI – which enables us to create code components
  • #12: Along with all these libraries and framework you can invoke your own or 3rd party libraries and WebApi’s