Friday, March 5, 2010

How to find a ListTemplateID in Sharepoint

I often require the ListTemplateID for querying or creating lists prophetically. Following is the simplaest way I found to get this ID

Go to a Sharepoint site in browser
Select View All Site Contents from site action menu
Click Create link from the top
Right click on list or library you want and click properties
In properties dialog you will find the ID at the end of the URL
For example in the following URL, 101 is the ID for Document Library

http://moss:80/Documents/_layouts/new.aspx?FeatureId={00bfea71-e717-4e80-aa17-d0c71b360101}&ListTemplate=101

Following is a list of common template IDs for your reference.

Template ID
GenericList 100
DocumentLibrary 101
Survey 102
Links 103
Announcements 104
Contacts 105
Events 106
Tasks 107
DiscussionBoard 108
PictureLibrary 109
DataSources 110
WebTemplateCatalog 111
UserInformation 112
WebPartCatalog 113
ListTemplateCatalog 114
XMLForm 115
MasterPageCatalog 116
NoCodeWorkflows 117
WorkflowProcess 118
WebPageLibrary 119
CustomGrid 120
DataConnectionLibrary 130
WorkflowHistory 140
GanttTasks 150
Meetings 200
Agenda 201
MeetingUser 202
Decision 204
MeetingObjective 207
TextBox 210
ThingsToBring 211
HomePageLibrary 212
Posts 301
Comments 302
Categories 303
IssueTracking 1100
AdminTasks 1200