Sunday, June 29, 2014

Workflow.asmx AtlerTodo

Hi,


The following code snippet for your reference:



int todoID =int.Parse(todoNode.Attributes.GetNamedItem("ows_ID").Value);
Guid tasklistID = new Guid(todoNode.Attributes.GetNamedItem("ows_TaskListId").Value);

XmlDocument doc = new XmlDocument();

StringBuilder xmlBuilder = new StringBuilder();
xmlBuilder.Append("<wor:taskData>");
xmlBuilder.AppendFormat("<my:myFields xmlns:my= \"{0}\">", "http://ift.tt/1jzoDez;);
xmlBuilder.Append("<my:TaskStatus />");
xmlBuilder.Append("<my:Comments />");
xmlBuilder.Append("<my:DelegateTo>");
xmlBuilder.Append("<my:Person>");
xmlBuilder.AppendFormat("<my:DisplayName>{0}</my:DisplayName>", "UserName");
xmlBuilder.AppendFormat("<my:AccountId>{0}</my:AccountId>", "UserLoginName");
xmlBuilder.AppendFormat("<my:AccountType>{0}</my:AccountType>", "User");
xmlBuilder.Append("</my:Person>");
xmlBuilder.Append("</my:DelegateTo>");
xmlBuilder.AppendFormat("<my:NewDescription>{0}</my:NewDescription>", "Description");
xmlBuilder.AppendFormat("<my:NewDueDate>2012-11-21 11:21:00</my:NewDueDate>");
xmlBuilder.Append("<my:RequestTo />");
xmlBuilder.Append("<my:Decline />");
xmlBuilder.Append("<my:dcr />");
xmlBuilder.AppendFormat("<my:Status>{0}</my:Status>", "Status");
xmlBuilder.Append("</my:myFields>");
xmlBuilder.Append("</wor:taskData>");

doc.LoadXml(xmlBuilder.ToString());

XmlNode node = ws.AlterToDo("http://moss/sitedirectory/msdn/shared documents/doc1.docx",
todoID, tasklistID, doc);

More information:

http://ift.tt/1jzoDeB


Best regards




Dennis Guo

TechNet Community Support



No comments:

Post a Comment