As a part of the august 2019 release the PCF team has come up with automating the process of fix-build-test cycle entirely speeding up the process. In the early releases we had a kind of a pain when creating a solution and importing it to the environment. It had several steps involved.

What is pcf push

Once done with creating your custom control or updating your existing control. You can now directly create and import the solution using the PowerApps CLI to the desired organization.

Always remember that using pcf push will only create an unmanaged solution and import it into your organization or Environment for now. If you need a managed solution you have to use the CDS project method.

Connecting to your Environment

Follow the steps below to create the authentication profile that connects to your environment, and import a new solution or updates your existing solution.

  1. open command prompt from the search menu.

2. Create an authentication profile using PowerApps CLI.

 pac auth create --url <your Common Data Service org’s url>    

3. You will be prompted with the login. Enter the credentials of your organization.

4. Once done you will get a message stating “Authentication successfully created”

If you have previously created an authentication profile, you can view all existing profiles using the command “pac auth list” and To get the basic information about the current organization mapped use “pac org who

To clear all authentication use “pac auth clear” and to delete a particular authentication profile, use index keyword

 pac auth delete --index < index of the profile > 

Once you delete it cannot be reverted back as it completely deletes the authprofile.json file and token cache file from your local machine.

Deploying your custom control

After you have successfully created an authentication profile, follow the below steps to deploy components.

  1. open the command prompt and navigate to folder path where you created your custom component project.
  2. Run the below command

–publisher-prefix is used to avoid duplication of your components

 pac pcf push --publisher-prefix <your publisher prefix> 

Once successful. You can find the unmanaged solution in your organization.

You can find the unmanaged solution you imported from $\[projectdir]\obj directory and is named “PowerAppsTools_[publisher-prefix]”.

You need not change the version in the cds proj each an every time you update any changes. When you use “pcf push” the version check is skipped, and the control built from your source code is imported over the top of what is in the organization.

when you make changes in your manifest file like adding a property, removing or modifying the controlManifest file. It would fail to update the solution, a workaround would be to delete the solution imported in the organization and try pushing it once again

Hope this helped you. Add your comments if you have any challenges in the above steps feel free to reach me out. I’ll respond as soon as possible.

Let me know your feedback in the comments section. Also, kindly don’t forget to like and share.

Happy Learning!!!

3 thoughts on “PowerApps Component Framework – Pcf Push

  1. Great one Vignesh! Suggest to include the command “pac install latest” for folks who are running old version of Powerapps CLI. Without doing that, my CMD prompt wasn’t recognizing the new commands.

    Liked by 1 person

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