Something interesting when creating a Discussion Thread
I always thought that a discussion thread is just a special content type that inherits from folder. So I thought creating a discussion thread is just as easy as adding a new item into a discussion board, and set the content type to thread. So I created a lookup field with the name "related" to use the discussion board as a storage for discussions done in a wiki library. Using the UI to create a thread, and link to a wiki page works perfectly, so my definitions are correct. However, creating a thread using object model yields a different result.
1. When clicking on the thread, it brings me to the item display form, instead of the flat view.
2. While the lookup field is established, and links to the wiki page, the rendering of the lookup field is not. Its always [ID]_.000.
Then I stumbled upon SPUtility.CreateNewDiscussion(). Used that, and everything works perfectly...