kwizcom banner advertisement

SharePoint Content Type IDs - How to Find / Create?

SharePoint Content Type IDs - Reference:
Here is the reference for SharePoint 2010 Parent content type id format:

Content Type ID
 System 0x
 Item 0×01
 Document 0×0101
 Event 0×0102
 Issue 0×0103
 Announcement 0×0104
 Link 0×0105
 Contact 0×0106
 Message 0×0107
 Task 0×0108
 Workflow History 0×0109
 Post 0×0110
 Comment 0×0111
 East Asia Contact 0×0116
 Folder 0×0120

How to find content type id in SharePoint 2010?
Go to: Site Settings >> Site Content Type Gallery and pick your content type. The url will be something like:
http://sharepoint.yourcompany.com/_layouts/ManageContentType.aspx?ctype=0x01013216CC96666E954646548B24654

Get the Content Type ID from URL Parameter Ctype.


Using PowerShell in SharePoint to Get Content type ID
We can retrieve all the available content type IDs using Object Model. Here is the PowerShell snippet
$SPsite = Get-SPSite "http://sharepoint.crescent.com"
$SPweb=$SPsite.RootWeb
write-host "Content Type Name ,  ID "
Write-host "------------------------ "

#Get All available Conent Types
$SPContentTypeCollection = $SPweb.AvailableContentTypes;

#Iterate through each content type and get name and ID
 Foreach ($SPContentType in $SPContentTypeCollection)
 { 
      write-host $SPContentType.Name "," $SPContentType.id  
 } 
sharepoint 2010 content type id format

How to create content type id in SharePoint?
Just Append a new GUID with Parent Content Type IDs (As provided in above table)

MSDN Reference: http://msdn.microsoft.com/en-us/library/aa543822.aspx
SharePoint Content Type IDs - How to Find / Create? SharePoint Content Type IDs - How to Find / Create? Reviewed by Salaudeen Rajack on 12:06 AM Rating: 5

No comments:

Please Login and comment to get your questions answered!

Powered by Blogger.