Announcements
I want to add a tab and web resource inside that tab on entity form by JavaScript creating a PCF control but not sure it's possible or not.
Please suggest how to achieve it.
If you want to add a tab to an entity form the only supported way of doing so is via the form designer which generates the xml file that is then rendered (via Javascript) when the form is loaded. You can in theory do it programmatically by editing the XML directly and saving those changes but I really, really would not recommend doing so and you can't do so in real time.
While manipulating the DOM of the entity form directly via Javascript is in theory possible (I'm aware of people that used to do it back in the olden days of on-premise environments) it would not be supported by Microsoft and could quickly go wrong if MS changed something in a subsequent release.
Has any way to add web resource and then add resource url under that web resource on any entity form pro-grammatically?
As I said above you can do it via editing the XML of the form directly but you can't do it in real time and you probably, really, shouldn't do it.
https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/customize-dev/customize-entity-forms has some background and https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/customize-dev/form-xml-schema has the schema for the old on-premise version of Dynamics .And that is all the information I can find on google which tells me a lot
I will add 5 more things
1) This documentation relates to the previous release and the schema may have changed since 2017 (I know it has)
2) Microsoft have not released a more recent version which tells me MS don't want people touching it except from tools they control
3) the lack of documentation means it's perfectly possibly that MS could argue it's no longer supported if things went wrong.
4) the xml is not validated when it is saved, it's very possible to create invalid XML that will break the form without
5) there is a complete lack of other blog posts regarding programmatically customizing forms - which shows how few people are brave enough to do it. I'm willing to do a lot of things and even I'm not brave enough to programmatically edit form xml.
So I hope that answers the question on how to do it and also explains why I really don't think it's a good idea...
Totally agree with what Ben has said - but I'm interested in why you want to do this - what's the use case?
Basically, I have a custom bing map functionality inject using web resource in any entity form manually following some steps. So I want to make it dynamically creating PCF component based on it.
@ShahriatHossain
Why not place the pcf control on the form in hidden mode and then unhide it when it meets the criteria? "Creating" pcf controls on the form on the fly is not possible as it would involve some dom manipulation which MS discourages.Cheers!
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 839
Valantis 533
Haque 412