Tuesday, September 18, 2012

Categorize discussion Forum threads in SharePoint Or Create folder in discussion forum


Creating folders feature is not available in discussion forum list using OOTB. But this can be achieved using custom coding but quite complex. Let us see the workaround for same in OOTB. Actually the discussion forum is uses two different content types (discussion and message). The discussion content type is derived from Folder content type and the message content type is derived from Item content type.  The folder content type is represented in different way through Discussion of course you cannot see the folder image but it works as folder. So the discussion forum simply not allows user to create folders, but the discussion threads and its replies can be categorized using  some trick.
As I said before when there are two content type are used in discussion forum and the mapping is done internally in discussion forum template. If user creates a new discussion thread, by default it uses “Discussion” Content type thereafter it starts using the “Message” content type. To categorize the discussion threads try below trick.

1.       Create a discussion forum list.
2.       Add an additional column “Category”

3.       Navigate to List setting of discussion forum list
4.       Open the Discussion content type and make sure the newly created “Category” fields is available.
 
5.       Open the Message content type and click on the “Category” field.

6.       Click on the Remove button to delete the field from Message content type.


7.       Make sure that field “Category” is available only in Discussion” content type.
8.       Create new threads and pass category value.
9.       Add a reply to the existing thread and make sure that the category filed is not shown.

10.  Modify the default view and apply group by on Category field.
11.  Navigate the discussion forum home page and check is that what is expected.


Enjoy learning SharePoint :-)