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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Programmatically regis...
Power Apps
Unanswered

Programmatically register PCF

(0) ShareShare
ReportReport
Posted on by 2

Hi

 

Is there any way to Programmatically register PCF control on entity?

 

PCFImg.png

 

FYI, i am able to add this control on sub grid of form by modifying form xml programatically. 

Thanks in advance..

I have the same question (0)
  • Ben Thompson Profile Picture
    1,400 on at

    Unless (or until) things change a Powerapp / D365 form is just an XML document which is rendered by the PowerApp / D365 system into the form you see on the page (from memory the page the xml conversion used to be done on the server but with the unified interface it is now rendered within the browser using Javascript).

     

    Given that you specify the type of control a field in the form editor I suspect the only way programmatically add the control to the form would be to changing the XML of the form programmatically - how to do that is probably worthy of some research and a blog post of 3 for someone with the time and inclination to do so as doing it incorrectly will result in an invalid page.

  • Hemant Gaur Profile Picture
    Microsoft Employee on at

    You can  configure the control to the relevant field and then look at the change in the custom control configurations to the form XML. This configuration binds the field to the custom control and right form factor. Directly modifying the formXML will work but bypass any validations  like control missing from CDS. 

     

    hemant 

  • sattu Profile Picture
    2 on at

    I want to add PCF control  at entity level as shown in above screenshot.

     

    By modifying form xml we can add PCF control on field or on Sub grid.

     

    Is there any way, we can modify entity xml programmatically.

     

    Thanks

  • Ben Thompson Profile Picture
    1,400 on at

    That wasn't what you asked for in the original question you talked about forms.

     

    In this case can I ask what your actual use case is?

     

    Programmatically changing things as @HemantG points out bypasses all the security checks built into the front end of D365 / Powerapps which is fine when the worst thing you can do is break part of a form, but when replacing the entity's default control will cause a lot of problems if the control does not exist, is invalid / broken or were you to try and move the entity to another solution.

     

    That's not to say you cannot try and do it I just really can't see any advantage and a lot of disadvantages in what you want to do. You would be better off creating a solution that contains both the PCF control and the top level entity details of the entities you want the control on and moving the solution around in sync.

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 Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 610

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard