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 / Add tab, web resource ...
Power Apps
Unanswered

Add tab, web resource by JavaScript creating PCF component on entity form

(0) ShareShare
ReportReport
Posted on by 7

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.

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

    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.

  • ShahriatHossain Profile Picture
    7 on at

    Has any way to add web resource and then add resource url under that web resource  on any entity form pro-grammatically? 

  • Ben Thompson Profile Picture
    1,400 on at

    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...

  • ScottDurow Profile Picture
    1,039 on at

    Totally agree with what Ben has said  - but I'm interested in why you want to do this - what's the use case? 

  • ShahriatHossain Profile Picture
    7 on at

    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. 

  • rexkenley Profile Picture
    203 on at

    @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.

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 839

#2
Valantis Profile Picture

Valantis 533

#3
Haque Profile Picture

Haque 412

Last 30 days Overall leaderboard