web
You’re offline. This is a read only version of the page.
close
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!

I have the same question (0)
  • Suggested answer
    meelamri Profile Picture
    13,216 User Group Leader on at

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

  • Community Member Profile Picture
    on at

    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.

  • Verified answer
    meelamri Profile Picture
    13,216 User Group Leader on at

    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.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Martin Dráb Profile Picture

Martin Dráb 58 Most Valuable Professional

#2
#ManoVerse Profile Picture

#ManoVerse 42

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 38 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans