cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dave8
Impactful Individual
Impactful Individual

How to create a table using the similar structure of the existing table within the environment?

Hello,

 

Could you please share the automated approach to create a new table using the existing table structure within the same environment in Microsoft Dataverse?

 

Thanks,

2 ACCEPTED SOLUTIONS

Accepted Solutions
ChrisPiasecki
Super User
Super User

Hi @dave8,

 

There's no out of box automated way, but there is an XrmToolbox plugin called the Clone Field Definitions Plugin that can copy all your columns (fields) from one Table to another. The Attributes Factory is a similar one where you can export out the columns of an existing entity, then create them for another table. You'd just need to create the new table first.

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

 

 

View solution in original post

EricRegnier
Super User
Super User

HI @dave8,

To supplement on the previous post, there are other out-of-the-box tricks with solutions:

  1. If you need to create the same table in the same tenant but different Dataverse environment, then simply export and import a solution.
  2. If you need same table in same Dataverse environment, then export a solution with your table (include all components). Unzip the solution file, edit the table physical name, change guids on forms, views. Re-zip and re-import

More complicated, but can use the SDK with .NET or Web API: https://docs.microsoft.com/powerapps/developer/data-platform/metadata-services#programmatically-work... 

Hope this helps...

View solution in original post

4 REPLIES 4
ChrisPiasecki
Super User
Super User

Hi @dave8,

 

There's no out of box automated way, but there is an XrmToolbox plugin called the Clone Field Definitions Plugin that can copy all your columns (fields) from one Table to another. The Attributes Factory is a similar one where you can export out the columns of an existing entity, then create them for another table. You'd just need to create the new table first.

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

 

 

EricRegnier
Super User
Super User

HI @dave8,

To supplement on the previous post, there are other out-of-the-box tricks with solutions:

  1. If you need to create the same table in the same tenant but different Dataverse environment, then simply export and import a solution.
  2. If you need same table in same Dataverse environment, then export a solution with your table (include all components). Unzip the solution file, edit the table physical name, change guids on forms, views. Re-zip and re-import

More complicated, but can use the SDK with .NET or Web API: https://docs.microsoft.com/powerapps/developer/data-platform/metadata-services#programmatically-work... 

Hope this helps...

hi @EricRegnier ,

 

Really appreciate for your sharing!

 

Would you please give more details about this process? Is the file customizations.xml to modify content in the unzipped exported zip file? I can only find physical name of fields but can't see a physical name of table/entity. Where to "change guids on forms", still in the customizations.xml? After re-zip, what "data source type" shall I choose to import the zip file? I tried "dataverse", it will connect to a dataverse without option to load from a zip file.

 

2. If you need same table in same Dataverse environment, then export a solution with your table (include all components). Unzip the solution file, edit the table physical name, change guids on forms, views. Re-zip and re-import

Hi @billjin,

Yes that's right, the customizations.xml is one of the files in the unzipped solution. When you add a table to the solution, make sure you include all components, not just sub-components.

What do you mean by "data source type" and what type of components are in the solution? A screenshot of the error(s) would help.

Cheers

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,610)