Please suggest how to achieve it.
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/... has some background and https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/customize-dev/... 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...
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.
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.
Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.
Did you miss the call?? Check out the Power Apps Community Call here!
ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.