How to Use Metadata Document Generator with Microsoft Dynamics CRM 2011

Metadata Document Generator for Microsoft Dynamics CRM 2011 — Quick GuideMicrosoft Dynamics CRM 2011 ships with many tools and features to help administrators and developers understand and document the data model they’re working with. One of the most useful utilities for documenting entities, attributes, relationships, option sets and more is the Metadata Document Generator (MDG). This quick guide explains what MDG is, why it’s useful, how to run it, common configuration options, how to interpret its output, and practical tips for using the generated documentation in projects.


What is the Metadata Document Generator?

The Metadata Document Generator is a community/third‑party tool (often provided as a solution or a code project) that extracts the metadata from a Microsoft Dynamics CRM 2011 organization and produces human‑readable documentation. The generated document typically lists entities, fields (attributes), data types, display names, schema names, relationships, option set values, and other metadata items. Outputs are usually produced in Microsoft Word (.doc/.docx) or Excel formats for easy sharing and archival.

Why use MDG?

  • Quickly create a snapshot of the CRM data model for handover, compliance, audits, or development planning.
  • Support development and integrations by providing clear names, schema names, data types and lengths required for API or integration mappings.
  • Improve communication between business users, analysts and developers by giving a consistent reference for field meanings and uses.
  • Track changes over time by generating documentation before and after deployments to show what changed.

When to generate metadata documentation

Generate metadata documentation in scenarios such as:

  • Before major customizations or upgrades.
  • During initial discovery for an integration project or data migration.
  • When onboarding new developers or administrators.
  • For compliance audits and internal documentation standards.
  • Prior to decommissioning or consolidating systems.

How MDG works (high level)

  1. MDG connects to a CRM organization using the CRM web services and retrieves the organization’s metadata via the RetrieveAllEntities, RetrieveEntityRequest and related metadata calls.
  2. It parses the returned metadata objects to extract details such as LogicalName, SchemaName, DisplayName, AttributeType, MaxLength, RequiredLevel, OptionSet values, Lookup targets, and Relationship metadata.
  3. The tool formats this information into a structured document—commonly grouping by entity, then listing attributes, relationships and indexes with descriptive columns.
  4. The result is saved as a .docx or .xlsx file that can be opened and edited by business or technical users.

Installing and obtaining MDG for CRM 2011

There have been multiple community implementations of metadata exporters for CRM 2011, including solutions built as:

  • A downloadable Windows application that connects to CRM (requires .NET and the CRM SDK assemblies).
  • A CRM solution that includes web resources and code to export metadata from within the organization.
  • Source code (C#) projects using the CRM 2011 SDK that you can compile and run.

Typical steps to obtain and run:

  1. Download the MDG package or source from a trusted community repository or internal artifact repository.
  2. If a compiled Windows app: ensure you have the CRM 2011 SDK assemblies (Microsoft.Crm.Sdk.Proxy.dll, Microsoft.Xrm.Sdk.dll) available and .NET Framework compatible (typically .NET 4.0 for CRM 2011 tools).
  3. If a CRM solution: import the solution into the target organization (watch for security/trust issues).
  4. Provide connection information (organization URL, authentication credentials). For on‑premises installs you may use domain credentials; for CRM Online you’ll use org credentials and potentially Live ID/ADAL patterns depending on the tool’s compatibility.
  5. Run the export and save the output file.

Step-by-step: Running a typical MDG Windows tool

  1. Prepare environment:

    • Install .NET Framework 4.0 (if required) and ensure CRM SDK assemblies are in the same folder as the tool or installed in the GAC.
    • Confirm you have an account with sufficient privileges (System Administrator or System Customizer) to read metadata.
  2. Launch the Metadata Document Generator application.

  3. Create a connection:

    • Enter the CRM organization web service URL or use a connection wizard.
    • Provide credentials and test the connection.
  4. Select export scope:

    • All entities or only selected entities (useful to reduce file size).
    • Choose whether to include system entities, custom entities, or both.
    • Option to include relationships, option sets, and attribute metadata details.
  5. Choose output settings:

    • Output format (.docx, .xlsx).
    • Include timestamps or organization name in the document header/footer.
    • Select language or display name fallbacks.
  6. Execute export:

    • Click Export / Generate.
    • Wait for the tool to retrieve metadata and build the document. Large organizations may take several minutes.
  7. Review and save:

    • Open the generated file, check formatting and completeness.
    • Store the document in version control or document repository.

Common fields and columns in the generated document

A typical entity section will include columns such as:

  • Display Name
  • Schema Name (logical name)
  • Attribute Type (e.g., String, Picklist, Lookup, Money)
  • Data Type (CRM internal)
  • Max Length / Precision
  • Required Level (Optional/BusinessRequired)
  • Searchable / Audit Enabled flags
  • Option set values (for picklists)
  • Lookup target entities (for lookup attributes)
  • Description or Help Text (if provided)

Relationships will usually list:

  • Relationship name (schema)
  • Related entities (1:N, N:1, N:N)
  • Referential behavior (cascade options)
  • Intersect entity (for N:N)

Interpreting option sets and global option sets

  • Option sets defined locally on an attribute will be listed under that attribute’s option values.
  • Global option sets (shared picklists) will be documented once, and attributes that reference them will point to the global option set name.
  • The document should include numeric values and labels so integrations can map values accurately (e.g., 100000000 = “Active – Verified”).

Best practices for using the generated documentation

  • Generate baseline documentation before major changes and store it in version control or a document management system.
  • Use the documentation for mapping during data migration — include both display labels and numeric values for option sets.
  • Share the document with business analysts to validate field meanings and to collect missing descriptions.
  • Periodically regenerate (quarterly or before releases) to catch drift between environments.
  • Consider augmenting the MDG output with a short glossary of business terms and examples for ambiguous fields.

Troubleshooting common issues

  • Authentication failures: ensure the tool supports your CRM deployment (on‑premises vs CRM Online) and that credentials are correct. For CRM Online, older MDG tools may not support modern authentication.
  • Missing assemblies: place required Microsoft CRM SDK DLLs in the tool folder or install the CRM SDK.
  • Large output: export selected entities or output to Excel to handle very large schemas more easily.
  • Incomplete display names: if the organization supports multiple languages, MDG may default to a language; change display language settings or use the tool’s language options.

Security and permissions

  • Metadata retrieval generally requires read access to metadata. Use an account with System Customizer or System Administrator roles for simplicity.
  • If using a community tool, validate the source and run in a controlled environment before importing into production.
  • Exported metadata may contain sensitive field names and descriptions; store documents securely.

Example use cases

  • Integration: A middleware developer uses the MDG output to map CRM fields to an external ERP system, using schema/logical names and data types to build transform rules.
  • Audit: A compliance officer requests metadata snapshots before and after a release to verify no unauthorized attributes were added.
  • Handover: When transferring maintenance to another team, the MDG document provides a readable inventory of entities and attributes.

Extending or customizing MDG output

  • If you have the source code, you can modify templates to include custom columns (e.g., business owner, last modified date).
  • Add a post‑processing script to convert output into wiki pages or import into documentation systems.
  • Combine MDG output with data samples to produce richer technical documentation (field examples, sample payloads).

Alternatives and complementary tools

  • The CRM SDK sample code includes snippets to retrieve metadata programmatically if you need custom exports.
  • Third‑party documentation tools and commercial metadata management platforms may provide richer visualizations, lineage tracking or automated comparisons between environments.
  • For newer Dynamics versions, Microsoft and partners provide updated metadata tools; MDG for CRM 2011 is specific to that legacy platform.

Conclusion

The Metadata Document Generator for Microsoft Dynamics CRM 2011 is a practical, time‑saving tool for producing clear, actionable documentation of your CRM schema. Use it to create baselines, assist integrations, support audits, and improve collaboration between technical and business teams. Keep security in mind, store outputs safely, and integrate MDG runs into your release and governance processes so documentation stays current.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *