title | description | ms.date | author | ms.author | ms.reviewer | ms.topic | search.audienceType | contributors | |||
---|---|---|---|---|---|---|---|---|---|---|---|
Sample: Dump table definitions to a file (Microsoft Dataverse) | Microsoft Docs |
This sample shows how to write out all the table definitions to an XML file. |
04/03/2022 |
mkannapiran |
kamanick |
jdaly |
sample |
|
|
This sample shows how to write out all table definitions to an XML
file. It uses the RetrieveAllEntitiesRequest message.
The following sample creates a new file at \Entities\bin\Debug\EntityInfo.xml
. You can open this file in Office Excel to see a tabular report. You may need this information to discover the entity type code for a custom table for use in reports.
[!div class="nextstepaction"] SDK for .NET: Dump table definitions to a file sample code
[!includecc-how-to-run-samples]
The RetrieveAllEntitiesRequest
message is intended to be used in a scenario that contains data that is needed to retrieve metadata information about all the tables.
In order to simulate the scenario described in What this sample does, the sample will do the following:
Checks for the current version of the org.
- The
RetrieveAllEntitiesRequest
method retrieves the metadata. - The
StreamWriter
creates an instance of StreamWriter to write text to a file.
This sample creates no records. No cleanup is required.
[!INCLUDEfooter-include]