Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
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?