DiscussionBoard Lists in sp2010: Part 1

In SP2010, actually all discussion board lists are created with BaseType = 0 and it falls in to GenericList category. This is a bug (definitely) in SP2010.

  1. This is the reason why you could not get them when you have tried with SPSiteDataQuery and list for BaseType = 3
  2. That’s why web.GetListsOfType(SPBaseType.DiscussionBoard) will not return any list.

(SharePoint Guys pls fix this…)

Using serverTemplate=108 with SPSiteDataQuery will still retrieve items from all Discussion Board list. SPSiteDtaQuery is efficient method for retrieving list items. There are few things to keep in mind while querying Discussion Board [or say any type of list]

  • If you want to retrieve all list names of specific type (not interested in list items) choose linq to SharePoint Option.
  • If you want to retrieve data from selected lists or from all lists in the current site collection choose SPSiteDataQuery.

Hope that helps…


One thought on “DiscussionBoard Lists in sp2010: Part 1

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s