Is there any way to export automatically or with a script a list of all the Dataverse tables in an organisation?
From our good friend Shan McArthur came a multilayer answer (narrated and illustrated by The Enabler):
One: We have a virtual entity called entities that will give you a list of all entities in the database.
- Open https://make.powerapps.com, ensure the correct environment.
- Expand Data, select Tables.
- Locate and select table Entity. If you can’t find it, make sure to switch the view from Default to All.
- Select Data tab, optionally change the view to All columns.
Two: You can also use our OData endpoint (/api/data/v9.2/entities).
- Sign in into https://adgaf.crm.dynamics.com
- Copypasta this URL: https://adgaf.crm.dynamics.com/api/data/v9.2/entities
- Optionally do sort – something you can’t do in the first method: https://adgaf.crm.dynamics.com/api/data/v9.2/entities?$orderby=versionnumber
- If the solutionid is fd140aae-4df4-11dd-bd17-0019b9312238, this is the Active layer and represents an unmanaged customization: https://adgaf.crm.dynamics.com/api/data/v9.2/entities?$filter=solutionid%20eq%20fd140aae-4df4-11dd-bd17-0019b9312238&$orderby=logicalname
Three: Otherwise, you can join to the solutions table and see what solutions each of these entities/tables are brought in from.
- I wish we could just $expand=solutionid in OData but solutionid is not a foreign key, i.e. not a navigation property. Joining in FetchXml works just fine though.
- You can use usual FetchXml manoeuvres like filtering and grouping to work out what table is in what solution.
<fetch top="50" > <entity name="entity" > <attribute name="name" /> <link-entity name="solution" from="solutionid" to="solutionid" > <attribute name="uniquename" /> </link-entity> </entity> </fetch>
Cover photo by Dimitra Peppa on Unsplash