Basic things you need to develop the custom control with PowerApps Component Framework PCF

Scenario: after seeing in the previous post How To install PowerApps CLI (command line interface) to create, debug and deploy custom components using PCF now we will see the basic things you need to develop your first custom control with PowerApps Component Framework PCF.

Solution: When you develop a custom control you need to know the basic architecture that makes up a typical custom control. Below is illustrated the common structure of each custom control:

Mainfest.xml

This is the primary file that define the behavior of the control, what data type it supports and the custom properties.

Methods

Any custom component that you want develop has its lifecycle, starting from initialization to rendering on the CRM form. It is always necessary to implement the following methods into index.ts file.

  • init: initialize the control. Here you build your control with the HTML elements that would be rendered on CRM forms.
  • updateView: fired when any property of your control changes (value or metadata related to field, eg. visibility).
  • getOutputs: called by framework when the data related to control changes.
  • destroy: called by framework when component is removed from DOM tree.

Hope it helps and happy 365Power’ing!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.