Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11508

Approving/Rejecting workflow tasks using client object model in SP2010/2013

$
0
0

Is it possible to approve/reject  the OOB Approval workflow tasks using client object model in SP2010/2013?

There are examples where workflow.asmx is used, but it was part of the MOSS.

It's easy to get the task list but there doesn't seem to be a way to approve individual tasks as the result is just a generic SPList.

var context = new ClientContext(url);
var web = context.Web;
var list = web.Lists.GetByTitle(listName);
var workflow = list.WorkflowAssociations.GetByName("Approval");

var taskListTitle = workflow.TaskListTitle;
var taskList = web.Lists.GetByTitle(taskListTitle);



Viewing all articles
Browse latest Browse all 11508

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>