Get the item a SharePoint workflow task is associated with
This is handy. SharePoint helpfully populates the meta data with the GUID of the list and the ID of the item a WF instance is associated with. These are stored in "ows_WorkflowListId" and "ows_WorkflowItemId" fields on the task list item.
An example of using this is from an InfoPath form in the form load code behind.
SPListItem currentListItem = SPContext.Current.ListItem;
if (currentListItem != null)
{
object associatedWfListId = currentListItem["ows_WorkflowListId"];
object associatedWfItemId = currentListItem["ows_WorkflowItemId"]; if (associatedWfItemId != null && associatedWfListId != null)
{
SPListItem item = web.Lists.GetList(new Guid(associatedWfListId.ToString()), false).GetItemById(int.Parse(associatedWfItemId.ToString()));
// THE ABOVE ITEM IS THE ASSOCIATED LIST ITEM
}
}
Get the item a SharePoint workflow task is associated with的更多相关文章
- Get item by sharepoint web service jquery
对于sp2010,在ie浏览器中这个代码无法生效,只有chrome可以生效. //获取附件id function GetAttachments(listName) { var soapEnv = '& ...
- sharepoint workflow不能正常使用
程序集“Microsoft.SharePoint.WorkflowServices, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce ...
- To get TaskID's Integer ID value from the GUID in SharePoint workflow
list.GetItemByUniqueId(guid).ID int itemID = spList.Items[new Guid("")].ID;
- Creating a SharePoint Sequential Workflow
https://msdn.microsoft.com/en-us/library/office/hh824675(v=office.14).aspx Creating a SharePoint Seq ...
- This task is currently locked by a running workflow and cannot be edited
转自:http://geek.hubkey.com/2007/09/locked-workflow.html 转自:http://blogs.code-counsel.net/Wouter/Lists ...
- SharePoint 2013 Nintex Workflow 工作流帮助(八)
博客地址 http://blog.csdn.net/foxdave 工作流动作 15. Complete Workflow Task(User interaction分组) 此工作流动作将完成任何进行 ...
- SharePoint 2013 create workflow by SharePoint Designer 2013
这篇文章主要基于上一篇http://www.cnblogs.com/qindy/p/6242714.html的基础上,create a sample workflow by SharePoint De ...
- approval workflow in sharepoint designer
http://office.microsoft.com/en-us/sharepoint-designer-help/video-create-an-approval-workflow-in-shar ...
- SharePoint 2013 Nintex Workflow 工作流帮助(十三)
博客地址 http://blog.csdn.net/foxdave 工作流动作 35. Delegate Workflow Task(User interaction分组) 该操作将委托未处理的工作流 ...
随机推荐
- [设计模式]<<设计模式之禅>>关于依赖倒置原则
依赖倒置原则(Dependence Inversion Principle,DIP)这个名字看着有点别扭,“依赖”还“倒置”,这到底是什么意思?依赖倒置原则的原始定义是 High level modu ...
- webView中支持input的file的选择和alert弹出
alert()弹出 input的file现选择(特别说明:不同的android版本弹出的样式不同,选择文件后自动上传) webView.setWebChromeClient(new WebChrome ...
- Commons Lang - StringUtils
Operations on String that are null safe. IsEmpty/IsBlank - checks if a String is empty (判断字符串是否为空) T ...
- JavaScript之图片滚动
向上滚动: <!doctype html> <title>javascript无缝滚动</title> <meta charset="utf-8&q ...
- RSS订阅推荐
科技新闻 虎嗅网 http://www.huxiu.com/ 科技博客的新生力量,文章以观点鲜明出名: 36氪 http://www.36kr.com/ 科技博客,关注创业,可以免费发表创业公司新闻 ...
- popViewControllerAnimated 后,对页面内UITableView 内数据刷新
popViewControllerAnimated后,这时它不执行viewDidLoad,所以不能及时对viewControler及时刷新,此时对该页面进行操作可以调用viewWillAppear:( ...
- Codevs 5126 推销员 2015年NOIP全国联赛普及组
5126 推销员 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 黄金 Gold 题目描述 Description 阿明是一名推销员,他奉命到螺丝街推销他们公司的产品.螺丝街是一条死 ...
- 暑假集训(4)第七弹——— 组合(hdu1850)
题意概括:你赢得了第一局.魔鬼给出的第二局是,如果有N堆牌,先手的人有几种可能胜利. 问题分析:尼姆游戏,先得到n堆牌的数量异或和,再将异或和与每一个牌组的数量异或,如果结果小于原牌组数量 则可能++ ...
- switch的case中不能做定义
switch的case中不能做定义 只能给语句 error: a label can only be part of a statement and a declaration is not a st ...
- d3 之值域映射
<html> <head> <meta charset="utf-8"> <title>d3研究室</title> &l ...