Announcements
Hi
Is there any way to Programmatically register PCF control on entity?
FYI, i am able to add this control on sub grid of form by modifying form xml programatically.
Thanks in advance..
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.
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
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
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.
Congratulations to our 2026 Super Users!
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Vish WR 610
Haque 317
WarrenBelz 315 Most Valuable Professional