views:

126

answers:

1

Hi all:

I was wondering how can I programmatically copy all the discussion items from one Sharepoint team discussion to another?

I have tried retrieving the team discussion items from an existing site as SPListItem. Although I could find the Team Discussion list, but I could not red the retrieved items by assigning them as SPListItems. Moreover, team discussion looked like it has a lot of fields that requires a lot of other information to be available e.g. users, threads, topics, etc. It certainly looks different than other ordinary lists. Would a simple copying of all the fields be sufficient, or there is more to it?

Thanks.

+1  A: 

Internally, discussion boards are standard SharePoint lists. The most likely source of confusion is that topic is a subtype of folder - as long as you maintain that folder structure you should be able to copy items between lists.

Tom Clarkson
@Tom Clarkson: so apart from the "topic", which I should treat it as a folder, the replies are just listitems, not files?
BeraCim
@Tom Clarkson: I guess what I dont understand is how should I treat the items inside the Team discussions... should I treat them as SPFiles, or SPListItems?
BeraCim
Unless you have attachments, there are no files involved.
Tom Clarkson
So I have to treat SPFolder as SPList, then treats the things in SPFolder as SPListItems? :S
BeraCim
No, it's a sharepoint folder (a type of item), not a file system folder.
Tom Clarkson
An SPFolder counts as an SPListItem for purposes of moving it around. I would be careful about moving them, though. See [this question](http://stackoverflow.com/questions/2588605/negative-itemcount-in-sharepoint-document-library), which while it has to do with document libraries, it might affect this kind of folder system as well.
ccomet