locked
Add reply to discussion from workflow RRS feed

  • Question

  • Hello!

    Is it possible to add a reply to a discussion from a workflow somehow? It would be great if it's possible to solve somehow!

    Sunday, October 17, 2010 11:30 AM

Answers

  • Hi Gildebrand,

     

    Thanks for your post.

    I don’t think you can achieve this using the OOB workflow or using the workflow created by SPD. You can’t find the reply field in the “Update item” action in SPD.

    You have to do this using the VS2010. Here is some sample code about replying discussion with OM.

     

    SPListItem parentItem = objList.GetItemById(discussionSubject.ID);      

    //Create reply to that discussion thread subject.     

    SPListItem reply = SPUtility.CreateNewDiscussionReply(parentItem);     

    reply["Body"] = "Posting a reply programmatically";     

    reply.Update();

     

    More information:

    http://www.etechplanet.com/codesnippets/post-a-reply-on-sharepoint-discussion-thread-programmatically-using-c-code.aspx


    SharePoint 2010
    Tuesday, October 19, 2010 6:43 AM

All replies

  • Hi Gildebrand,

     

    Thanks for your post.

    I don’t think you can achieve this using the OOB workflow or using the workflow created by SPD. You can’t find the reply field in the “Update item” action in SPD.

    You have to do this using the VS2010. Here is some sample code about replying discussion with OM.

     

    SPListItem parentItem = objList.GetItemById(discussionSubject.ID);      

    //Create reply to that discussion thread subject.     

    SPListItem reply = SPUtility.CreateNewDiscussionReply(parentItem);     

    reply["Body"] = "Posting a reply programmatically";     

    reply.Update();

     

    More information:

    http://www.etechplanet.com/codesnippets/post-a-reply-on-sharepoint-discussion-thread-programmatically-using-c-code.aspx


    SharePoint 2010
    Tuesday, October 19, 2010 6:43 AM
  • can you explain this a bit more? i am also looking for it
    Wednesday, September 7, 2011 8:23 PM