Recently I had to query a list in a meeting workspace, but I got an empty resultset for every meeting except the first one. Seems that tools like the U2U CAML Query Builder and SharePoint Manager 2007 were only able to query the items of the first meeting. Time to start googling and after some time I found a post of Sanket Shah describing the same problem I had. There is one property, ‘query.MeetingInstanceId’, you have to set on the query, if you want to get items out of a list other than those of the first meeting. It won’t work if you add the Instance ID column to your CAML query.

Code example (list is an SPList):

Dim query As SPQuery = New SPQuery()
query.Query = YourCAMLQuery
query.MeetingInstanceId = instanceID
Dim results As SPListItemCollection = list.GetItems(query)

Ever wanted to add an item to a list inside a Meeting Workspace? Well, I did and I couldn’t find instructions on how to. Don’t understand me wrong, I did know how to add an item to a list, but what about the instance id. This is pretty simple, every list in a workspace has a field, called ‘Instance ID’, type Integer. So just set the value of this field for each item to the correct ID and the item only shows under the specified meeting date.

Small code example (workspace is a SPWeb object):

Dim list As SPList = workspace.Lists(“aListName”)
Dim listItem As SPListItem = list.Items.Add()
listItem(“Title”) = “aItemTitle”
listItem(“Instance ID”) = 1
listItem.Update()

Update 8 june 2009: It only works for new items. Instance ID is a readonly field, so don’t try to reset it and update the listitem. It simply keeps the old value. There must be some special setting method implemented to have this behaviour.