Wednesday, October 10, 2012

Easy way to identify the Content Type ID and/or GUID of a content type

If you're looking for an easy way to identify the Content Type ID and/or GUID that is associated with a content type, here are a few quick steps that you can use:

  1. Navigate to the root site where your content types are stored
  2. Click on Site Actions -> Site Settings
  3. Under Galleries, click on Site content types
  4. Locate and click on the link associated with the content type you wish to obtain the GUID for
  5. Right-click on the URL in your browser and select Copy
  6. Open Notepad and paste the link so that you can review it
  7. The Content Type ID associated with your content type is located immediately in between the text that reads "ctype=" and the first ampersand, "&", character.  Here is a quick sample of what this will look like with the appropriate Content Type ID bolded:

    http://webapplicationname/sitename/_layouts/ManageContentType.aspx?ctype=0x01010035C1DFBDC85613499278F0D16DBD4C5D&Source=...
If you're interested in obtaining the GUID from a Content Type ID associated with a Document Library, you simply need to remove the "0x010100" prefix.  Further details on what makes up a Content Type ID can be found at the following location:

http://msdn.microsoft.com/en-us/library/aa543822.aspx

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.