The Microsoft Dynamics CRM Blog
News and views from the Microsoft Dynamics CRM Team

Metadata Browser for Microsoft Dynamics CRM 2011

Metadata Browser for Microsoft Dynamics CRM 2011

  • Comments 5

People have been asking “Where is the metadata browser in Microsoft Dynamics CRM 2011?”. For those of you who don’t know what the original metadata browser was, see Metadata Browser. The original metadata browser was removed from CRM 2011.

I’m happy to announce that the latest update to the Microsoft Dynamics 2011 Software Development Kit (SDK) includes a managed solution that replaces and I hope improves upon the original metadata browser. To get the new metadata browser you must:

1. Download the SDK (here).

2. Install the SDK.

3. Import the MetadataBrowser_1_0_0_1_managed.zip located in the SDK at SDK\Tools\MetadataBrowser\.

After you install the Entity Metadata Browser it will appear in the Customizations area.

clip_image002

The initial view is just a list of entities with a detail list of the properties for the selected entity. There are capabilities to filter the list of entities. You can choose to filter on the following properties:

  • Custom entity
  • Customizable entity
  • Intersect entity (an entity used in Many-To-Many relationships)
  • Type of entity ownership

You can also do a text search that looks for matches in the following:

  • SchemaName (and by extension Logical Name)
  • Display Name (if the entity has one)
  • Object Type Code
  • MetadataId

For the Properties grid, you can filter the list of property names. This properties grid shows only the simple values for the properties. In reality, many of these properties are objects with many more additional properties. For the sake of simplicity only the most useful property value is shown here.

To view all the details for an entity, you need to right-click the SchemaName value and choose View Details from a context menu. For those entities that appear in the default solution, you also have the ability to select Edit which will open the entity definition in the default solution.

When you view the details for an entity, a new window opens and you can navigate to each of the more complex properties.

The Properties view allows you to drill down and see all the details for the complex properties.

clip_image004

If you expand a Label property like DisplayName, you can see all the details that a Label property has:

clip_image006

The Attributes view shows all the attributes and you can filter by:

  • Custom attributes
  • Customizable attributes
  • Type of Attribute
  • Type of entity ownership
  • Text match on SchemaName, DisplayName and MetadataId

Properties for the selected attribute appear on detail grid.

clip_image008

For OptionSet (Picklist) attributes you can view all the options and expand down to view all the properties for the option set.

Simple view of the Account.AccountCategoryCode.OptionSet property:

clip_image010

Expanded view of all the details:

clip_image012

Similar details are available for entity relationships and privileges.

Most property names and simple values can be copied to your clipboard by right-clicking and choosing the Copy option from a context menu. At this point, complex property values do not support being copied to the clipboard.

Technical Details

Although it is included in the SDK, it isn’t a sample. We aren’t publishing the source code since the vast majority of it is just rendering the UI and that really has nothing to do with Microsoft CRM. The Metadata browser is done using HTML and JScript Web resources. It doesn’t use JQuery or any other supporting libraries.

The SDK.Metadata.js sample library from the SDK is used to retrieve data. A much simpler sample and the full code for that library is published in the SDK at Sample: Retrieve Entity Metadata using JScript.

I hope that this solution will help you explore, understand and make productive use of the Microsoft CRM 2011 entity metadata.

Cheers,

Jim Daly



  • Hello, I downloaded the SDK onto our CRM 2011 server and imported the Metadata Broswer zip file.  I now see the Metadata Browser link under the Customizations group, but when I click on it I get a javascript error.  My role is System Admin and I have Administrator rights to the server as well.  Any ideas?  Thanks.

    Message: Access is denied.

    Line: 1

    Char: 1412

    Code: 0

    URI: http://<Org URL>/%7B634383219730000000%7D/WebResources/sample_/MetaDataBrowser/Scripts/SDK.MetaData.js

  • I get the same problem, it seems only the user who imported the solution can access it, all other users are denied.

  • Attribute display NOT working on entities that have been migrated from CRM4 and customized

  • I have installed as above, however there is no data in the browser view

    Any ideas?

  • Sorry for the delay in responding. I didn't get notification that there were comments on this blog.

    The Access denied error is possibly due to a cross domain issue. Make sure that you open Microsoft CRM using the registered server name. i.e. don't use http://localhost, an IP address or some host header.

    The solution depends on the context.getServerUrl function which only returns the registered server name. If you login using some other URL and then the code in the solution uses the registered server name, IE interpretes this as a different domain and additional security kicks in.

    If you must use another URL, you may try adding both URLs to your IE trusted sites and configure your trusted sites to allow cross domain requests. I've used this for similar situations, but not with this particular solution.

    JohnG - if you see this. Please send feedback to mscrmdf@microsoft.com

    Paste this in as the subject of your e-mail:"Customize Entity Metadata (/1:SDK Content/2:V5.0/3:V5.0.4/4:a55bbb88-a323-4f69-9551-0d2951dd12ec/5:none/6:en-us/7:Both)" - this message will get routed to me.

Page 1 of 1 (5 items)
Leave a Comment
  • Please add 3 and 6 and type the answer here:
  • Post