Export All Dynamics 365 Option Sets with XrmToolBox

In Microsoft Dynamics 365 and Dataverse, Option Sets, also known as Choice Fields, are fundamental for standardizing data entry and improving reporting accuracy. Organizations frequently need to export these option set values for various critical activities, including documentation, integration mapping, testing, auditing, and data migration.

Manually navigating through each table and field to extract option values can be an incredibly time-consuming and error-prone process. Fortunately, XrmToolBox offers powerful plugins that empower administrators and developers to export all option set metadata into Excel, facilitating easy analysis and comprehensive documentation. Tools like the Metadata Document Generator and OptionSet Editor are invaluable for extracting this information from Dynamics 365 environments.

This article will guide you through the process of exporting all option sets from Dynamics 365 using XrmToolBox, ensuring you have accurate and organized metadata at your fingertips.

Why Export Option Sets?

Having readily accessible option set information is crucial for several business and technical needs:

Key Benefits of Exporting Option Sets:

What is XrmToolBox?

XrmToolBox is a free, community-driven application that provides a suite of powerful tools for administration, customization, and development of Microsoft Dynamics 365 and Dataverse environments. It hosts numerous plugins designed to simplify complex tasks.

Key Features of XrmToolBox:

Export Workflow Overview

The general process for exporting option sets using XrmToolBox and the Metadata Document Generator plugin follows these steps:

  1. Install XrmToolBox: Download and set up the application.
  2. Connect to Dynamics 365: Establish a connection to your target environment.
  3. Open Plugin: Launch the Metadata Document Generator.
  4. Load Entities: Retrieve metadata from the connected environment.
  5. Select Option Sets: Filter to specifically export choice field attributes.
  6. Generate Excel: Create the document containing all option set values.

Step-by-Step Guide: Exporting Option Sets with Metadata Document Generator

Step 1: Install XrmToolBox

If you don't already have it, download XrmToolBox from the official website. It's a free tool widely used by Dynamics 365 professionals.

Step 2: Connect to Your Dynamics 365 Environment

Once XrmToolBox is installed, you need to connect it to your Dynamics 365 or Dataverse instance.

  1. Open XrmToolBox.
  2. Click on Connect in the toolbar.
  3. Choose Microsoft Login to authenticate.
  4. Enter your Dynamics 365 credentials and select the environment you wish to connect to.

Step 3: Open Metadata Document Generator

The Metadata Document Generator is the primary tool for this task.

  1. Navigate to the Tools tab within XrmToolBox.
  2. Search for and select the Metadata Document Generator plugin.
  3. If the plugin is not installed, XrmToolBox will prompt you to install it from the Plugin Store.

This plugin is capable of generating comprehensive Excel and Word documentation detailing entity and attribute information.

Step 4: Load Entities

After opening the plugin, you need to load the metadata from your connected environment.

Step 5: Select Option Set Attributes

To focus specifically on option sets, you need to filter the loaded metadata:

Step 6: Select Output File Location

Choose where you want to save your exported option set data.

Step 7: Generate Document

With all settings configured, you can now generate the export.

Example Output

The generated Excel file will typically contain columns such as:

For global option sets like CustomerType or ApprovalStatus, the output will clearly list the choice name, option value, and display label.

For local option sets (choices specific to a field on an entity), the output will typically include the Entity Name, Field Name, Choice Values, and Labels.

Real-World Examples of Option Set Exports

Data Migration Projects

When migrating data from a legacy system to Dynamics 365, you often need to map source system values to Dynamics 365 choices. Exporting option sets provides a definitive list for creating accurate mapping sheets, ensuring data integrity during the migration process.

Integration Documentation

For integrating Dynamics 365 with ERP systems or other applications, detailed choice field values are essential. Exporting metadata allows you to quickly share these values with integration teams, accelerating development and reducing errors.

Business Documentation

Regularly documenting your CRM configuration, including all option sets and their values, is a best practice. This provides a valuable resource for new team members, business analysts, and for auditing purposes.

Alternative Tool: OptionSet Editor

While the Metadata Document Generator is excellent for comprehensive exports, XrmToolBox also offers the OptionSet Editor plugin. This tool provides additional features:

OptionSet Editor is particularly useful for managing and modifying option sets directly within XrmToolBox.

Common Challenges and Troubleshooting

Best Practices for Managing Option Set Exports

Conclusion

Exporting all Option Sets from Dynamics 365 using XrmToolBox is undoubtedly one of the most efficient ways to document and analyze choice fields across your environment. By leveraging powerful plugins like the Metadata Document Generator or the OptionSet Editor, administrators and developers can quickly generate comprehensive Excel reports containing option set names, labels, and values.

This streamlined approach significantly reduces the manual effort traditionally associated with metadata extraction, leading to improved documentation, smoother integrations, more accurate data migrations, and enhanced reporting capabilities. Integrate this practice into your Dynamics 365 governance strategy for better data management and system understanding.