0

I am facing this error while creating new discussion reply programmatically. I am using the below lines to create reply

SPListItem topic = spListDisc.GetItemById(id);
SPListItem reply = SPUtility.CreateNewDiscussionReply(topic);
reply["Body"] = "Hello";
reply["Author"] = Currentuser;
reply.SystemUpdate(false);

Is there anything going wrong?

  • i think reply["Author"] = Currentuser is the cause for the issue. remove that line and try to update. – TARUN May 24 '17 at 5:20
  • Thanks for the reply Tarun , but that is not the problem, i have checked it. – DRS May 24 '17 at 5:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.