Tuesday, February 16, 2010

How to reply on discussion thread programmatically – Part 1

Hi All,

We all know how to create discussion list programmatically, however question comes how to reply individual discussion thread programmatically.

Well, before starting, just would like to tell you that in this post, I am going to cover very basic idea about discussion list objects and some tips. However in next part 2, I am going to cover in detail about replies and individual threads of discussion list.

This is how you create the discussion list programmatically and its discussion topic in it.

Create Discussion list programmatically and add thread programmatically

Let’s say you have now your topic in your hand and then we need to take out that topic as SPListItem object.

SPListItem reply = SPUtility.CreateNewDiscussionReply({SPListItem Topic Object});
reply["Body"] = "Yeh!!This is reply from code.";
reply.Update();

So this is a reply to a thread created programmatically. Watch out for next part as it explains in depth details about discussion list coding stuff.

0 comments:




Share your SharePoint Experiences with us...
As good as the SharePointKings is, we want to make it even better. One of our most valuable sources of input for our Blog Posts comes from ever enthusiastic Visitors/Readers. We welcome every Visitor/Reader to contribute their experiences with SharePoint. It may be in the form of a code stub, snippet, any tips and trick or any crazy thing you have tried with SharePoint.
Send your Articles to sharepointkings@gmail.com with your Profile Summary. We will Post them. The idea is to act as a bridge between you Readers!!!

If anyone would like to have their advertisement posted on this blog, please send us the requirement details to sharepointkings@gmail.com