Hi All,
I need to approve users Task programmatically from API. I use code below to do this. But how can I add a comment like from Task Form? I am using SPComments from workflow side. So, I need to add a comment to the same field.
using (SourceCode.Workflow.Client.Connection k2Conn = new Connection())
{
k2Conn.Open(strServer);
WorklistItem k2WLItem = k2Conn.OpenWorklistItem(serialNumber);
k2WLItem.ProcessInstance.DataFieldse"Comments"].Value = approverComments; // this line does not work because field "Comments" does not exist
k2WLItem.Actions.takenAction].Execute();
k2Conn.Close();
}