Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

C# Add Controls/Sections/Tabs to Form via the CRM SDK

(0) ShareShare
ReportReport
Posted on by

Hello Experts,

I am trying to "duplicate" an Entity. I managed to duplicate its Attributes, but I don't know how to duplicate its Form. I am looking for something like:

TabMetadata Tab1 = ParentEntity.Form.Tabs.First() ......

Is there a library which gives easy access to Form Metadata?

Thanks!

  • Verified answer
    meelamri Profile Picture
    13,212 User Group Leader on at
    RE: C# Add Controls/Sections/Tabs to Form via the CRM SDK

    Hi,

    You can use this tool : https://www.xrmtoolbox.com/plugins/ITLec.FormXmlManager/ It will generate the IDs for you: 

    pastedimage1618503599554v1.png

    Honestly, I don't know the impact if you keep the same IDs, but I guess it's not a problem because your component is linked to your form which is unique.

    Please, don't forget to verify my answer if it was helpful, thank you.

  • Community Member Profile Picture
    on at
    RE: C# Add Controls/Sections/Tabs to Form via the CRM SDK

    Thanks for your suggestion!

    I looked into the formXML in the database and indeed it has everything I need. I decided to go with simple copy-paste of the form and modifying it with replace all in VS Code.

    My concern is that I see that every customization of the form(tabs, sections, controls) has an unique ID.

    If I copy the formXML of another entity and delete all the ID's and then use that edited form to update an entity in the database, will it automatically create new unique ID's for all the customizations (tabs, sections, controls) ? Or will I break the entity/instance ?

    Do you have a suggestion on how to do this safely ?

    To be clear, I want to duplicate the form since I have exactly the same custom fields in both entities. I can use replace all to change the prefixes. Ex: Replace All xx_client1 with xx_client2 and delete all unique IDs. Then I would use that form to update formXML of Client2 in the database in SystemForm table.

  • Suggested answer
    meelamri Profile Picture
    13,212 User Group Leader on at
    RE: C# Add Controls/Sections/Tabs to Form via the CRM SDK

    Hi Victor,

    I'm afraid there is no library to manipulate the forms. A form corresponds to a systemforms entity record. The configuration of a form is stored in the formXml field.

    You can still try to manipulate the xml via c#. You can refer to the following blogs:

    coderscollection.wordpress.com/.../

    I worked on the same subject recently, I was able to customize the form using power automate cloud flows, this is my blog: xrmtricks.com/.../

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,261 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,013 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans
Liquid error: parsing "/globalsearch/?q=dark+memes+adult+actresses++Indian+" - Nested quantifier +.