web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

How to Create a Custom Control Component for a Dynamics Power Apps Environment

(3) ShareShare
ReportReport
Posted on by 14
I am trying to recreate a development environment that was made by a previous developer for Dynamics Power Apps. There is a custom control component in the original environment that needs to be replicated in the new environment. I tried transporting the component using a solution, but it did not appear in the solution XML files on export and disappeared on import. I used "Inspect Element" in the old environment to look at the original component's code in ".css" and ".tsx" files, and found manifest information through solution layer properties, but I do not know how to actually build a component. What should I do from here to create the component in the new environment?
I have the same question (0)
  • Suggested answer
    Jeffrey Bulanadi Profile Picture
    9,112 Super User 2026 Season 1 on at

    Hi,

    Common pain point when inheriting environments with undocumented PCF (PowerApps Component Framework) controls. Since the control didn’t appear in the exported solution XML, it likely wasn’t packaged correctly or was deployed manually outside the solution layer.

    Here’s a step-by-step recovery and rebuild path:

    Step 1: Set Up Your Dev Environment

    Make sure you have the following installed:

    • Node.js (LTS version)
    • Power Platform CLI (pac)
    • Visual Studio Code
    • .NET Framework 4.6.2+ (required for CLI)
    • Optional: Power Platform Tools extension for VS Code


    Step 2: Initialize a New PCF Project

    Use Power Platform CLI to scaffold the component:

    bash
    pac pcf init --namespace <YourNamespace> --name <ComponentName> --template field

    Then install dependencies:

    bash
    npm install
    
    Step 3: Rebuild the Component Logic

    Based on your .tsx, .css, and manifest inspection:

    • Copy the original TypeScript logic into index.ts
    • Add your CSS styles into a new file and reference it in ControlManifest.Input.xml
    • Reconstruct the manifest file using the tags you found (control, property, resources, etc.)

    Step 4: Test Locally

    Run:

    bash
    npm start

    This launches the PCF test harness in your browser. You can debug and validate the control before packaging.

    Step 5: Package and Deploy

    Authenticate to your target environment:

    bash
    pac auth create --url https://<your-org>.crm.dynamics.com
    

    Then push the control:

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


    This creates a solution with your control and deploys it to Dataverse.

    Step 6: Add Control to Entity/Form

    In Power Apps:

    • Go to the entity or form
    • Click Controls > Add Control
    • Select your custom control and configure visibility

    Notes

    • If the original control was never packaged, check the old environment’s custom solution layers or plugin registration for clues.
    • Consider submitting the rebuilt control to the PCF Gallery for future reuse and community visibility.


    Helpful Reference
    Create and build a code component – Microsoft Learn


    If you find this helpful, feel free to mark this as the suggested or verified answer.

    Cheers
    Jeffrey
  • Ramesh Kumar Profile Picture
    7,547 Super User 2026 Season 1 on at
    I hope below can help
     
     
    Thanks
    Ramesh
     
    If this was helpful, please check the "Does this answer your question?" box and mark it as verified.
  • Suggested answer
    Mansi Soni Profile Picture
    8,951 Super User 2026 Season 1 on at
  • Verified answer
    DAnny3211 Profile Picture
    11,417 Super User 2026 Season 1 on at

    Hello,

    Thank you for your detailed explanation. Recreating a custom control component in a new Dynamics 365 / Power Apps environment requires a few structured steps, especially when the component does not appear in the exported solution XML or fails to import correctly.

    Recommended Approach:

    1. Verify Component Type
      Ensure that the control is a PCF (PowerApps Component Framework) component. These are typically developed using TypeScript and React, and are packaged separately from standard solution components.

    2. Locate the Original Source Code
      If the component was custom-developed, the original source code (including .tsx, .css, and ControlManifest.Input.xml) should ideally be available in a source control repository (e.g., Azure DevOps, GitHub). If not, and you only have access to the deployed environment, retrieving the full component code may not be feasible.

    3. Rebuild the Component
      If you have the manifest and partial code (as seen via browser inspection), you can attempt to rebuild the component using the Power Apps CLI. Steps include:

      • Install Power Platform CLI.
      • Use pac pcf init to scaffold a new component.
      • Recreate the manifest and logic based on the original component’s behavior.
      • Build and test the component locally.
    4. Deploy the Component
      Once rebuilt, package the component using pac solution add-reference and pac solution pack, then import it into your target environment via a managed or unmanaged solution.

    5. Check Solution Layers
      If the component was part of a managed solution, ensure that it was not hidden or overridden by another layer. Use the Solution Layers tool in Power Apps to inspect component visibility.

    6. Documentation and Support
      If the component was provided by a third party or ISV, consider reaching out to the original developer or vendor for access to the source or deployment package.

    If this guidance helps resolve your issue, please consider marking the response as accepted so it may assist others facing similar challenges.

    Best regards.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
11manish Profile Picture

11manish 172

#2
ManoVerse Profile Picture

ManoVerse 58 Super User 2026 Season 1

#3
Niki Patel Profile Picture

Niki Patel 42

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans