SharePoint Content Type ID GUID’s – Parent and Child

If you are looking to work with Content Types in SharePoint programmatically, you should understand the naming conventions used to compose the ID’s.

A content type’s ID shows inheritance. This is based on string concatenation with ’00’ as the seperator. This is generally in the form ‘0x[baseID]00[GUID (new id)]00[and so on]‘.

As an example, the ID of the built-in content type Item is 0x01. When inheriting from it, an example custom content type would be 0x010100E0D3BD7003DA22419C52027ABF151.
You will notice the custom content type ID starts with the ID for Item (0x01) followed by the ’00’ separator and then the GUID assigned to this content type.To find the parent of any content type, all that is needed is to split that content types ID on the separator ’00’ and examine the inheritance chain.


Using this convention, you can determine not only what content types a content type inherits from, but at which point two content types have common ancestors.
The following figure shows the relationship of the four content types detailed in the previous diagram. In each content type, the unique portion of the content type ID is represented by blue text:

PowerShell can be used if you don’t have a development tool to look Content Type ID’s automatically. Below is a PowerShell script to get you the IDs of all content types on a site:

$site = Get-SPSite http://mysite.myfarm.com
$web = $site.RootWeb
ForEach($ctype in $web.ContentTypes){write-host $ctype.Name": "$ctype.ID}
Sample Output:

References:
Content Type ID’s – MSDN:
http://msdn.microsoft.com/en-us/library/aa543822.aspx
Content Type Element (ContentType) – Technet:
http://msdn.microsoft.com/en-us/library/aa544268.aspx
Standardize Data Management with Content Types:
http://technet.microsoft.com/en-us/magazine/2008.02.contenttypes.aspx

Leave a Reply

I've been low-key stressed about how to view the many email inboxes I have in Outlook in one view without having to scroll and hunt for new messages.

The 'macro' method in this video works great.

View Multiple Inboxes at Once in Outlook 365 https://youtu.be/NpFSsovHgVo via @YouTube

We help Department of Defense clients realize benefits such as faster decision making, total traceability, and automated updates by identifying targeted goals and putting an emphasis on a culture of adoption through buy-in by individual team members.

https://bit.ly/3IRc68a

How to: Create a report quickly from a #SharePoint list or library in the #PowerBI service
📈📉📊📈📉📊
https://bit.ly/3vbKfMD
#Microsoft365

Leverage Microsoft Project for the web with the Project Accelerator https://youtu.be/Hxr8dncHmT8 via @YouTube

Load More...