Skip to main content

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();
}


I found SharePoint comments in k2WLItem.ProcessInstance.XmlFields["SPComments"].Value. You have to parce XML inside of this field and add your own comment.


Hi, Yeap, You can approve or reject any request with out logging into salesforce.com Go to Setup-Create-WorkFlow & Approvals-settings-Check the "Enable Email Approval Response" . When an approval process assigns an approval request to a user, Salesforce automatically sends the user an approval request email,the user can reply to the email by typing approve,approved,yes,reject,rejected,or no in the first line of the email body, and adding comments in the second line. Note: Approvers must have the “API Enabled” system permission to approve or reject approval requests via email. I hope it would help you...

Regaeds

dissertation help


Reply