Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Resume a SharePoint 2013 Workflow through CSOM
WhatsApp
Lakshmanan Sethu Sankaranarayan
Oct 20
2014
3.3
k
0
0
In this Code snippet, we are going to learn about resuming the SharePoint 2013 workflow through CSOM code.
ClientContext spClientContext =
new
ClientContext(
"http://EmployeeSiteCollection/Site"
);
NetworkCredential spCredential = newNetworkCredential (
"UserName"
,
"Pwd"
);
spClientContext.Credentials = spCredential;
Microsoft.SharePoint.Client.WorkflowServices.WorkflowServicesManager spWorkflowServicesManager =
new
Microsoft.SharePoint.Client.WorkflowServices.WorkflowServicesManager(spClientContext, spClientContext.Web);
Microsoft.SharePoint.Client.WorkflowServices.WorkflowInstance spWorkflownInstance = spWorkflowServicesManager.GetWorkflowInstanceService().GetInstance(newGuid (
"workflowInstanceID"
));
var
initiationData =
new
Dictionary<string, object>();
spWorkflowServicesManager.GetWorkflowInstanceService().ResumeWorkflow(spWorkflownInstance);
spClientContext.ExecuteQuery();
Happy SharePointing :-)
SharePoint 2013 Workflow
CSOM code
Up Next
Resume a SharePoint 2013 Workflow through CSOM