November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Hi Shawn,
According to the SDK this is how it is suppose to be done, the AddTopic method takes a topic and persists it in the database. However I see that you do not use the return value from AddTopic and assign it to your created topic:
relateTopic = ForumHandler.Instance.AddTopic(relateTopic);
/T
See code below:
Topic relateTopic = new Topic(currentPage.GetForumRoom(), topic.Title, topic.Body, new UserAuthor(CurrentCommunityUser));
ForumHandler.Instance.AddTopic(relateTopic);
return RedirectToAction("ViewTopic", new { id = relateTopic.ID });
------------------
In the above, the relateTopic.ID is always -1. How do I immediately get the newly created topic ID back so I can take some further action with it?