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分组) 该操作将委托未处理的工作流 ...
随机推荐
- poj 1741 树的分治
思路:这题我是看 漆子超<分治算法在树的路径问题中的应用>写的. 附代码: #include<iostream> #include<cstring> #includ ...
- 【转】android 安卓APP获取手机设备信息和手机号码的代码示例
http://blog.csdn.net/changemyself/article/details/7421476 下面我从安卓开发的角度,简单写一下如何获取手机设备信息和手机号码 准备条件:一部安卓 ...
- [算法练习] UVA-10010-Where's Waldorf?
UVA Online Judge 题目10010 Where's Waldorf? Waldorf在哪? 问题描述: 给出一个m行n列的字符矩阵(),和一个单词列表,在矩阵上匹配每个单词.在矩阵上匹 ...
- 【转载】Spark SQL 1.3.0 DataFrame介绍、使用
http://www.aboutyun.com/forum.php?mod=viewthread&tid=12358&page=1 1.DataFrame是什么?2.如何创建DataF ...
- C# 保存PictureBox中的图片到数据库,并从数据库读取图片显示到PictrueBox,解决报错 “无效参数”
下面是两段关键代码: /// <summary> /// 将一张图片转换为字节 /// </summary> /// <param name="img" ...
- ASP.NET 之 常用类、方法的超级总结,并包含动态的EXCEL导入导出功能,奉上类库源码
实用类:UtilityClass 包含如下方法 判断对象是否为空或NULL,如果是空或NULL返回true,否则返回false 验证手机号是否正确 13,15,18 验证邮箱 验证网址 MD5加密,返 ...
- iOS安全——代码混淆&反编译
本文是初步了解和集成网上的相关反编译博客, 并做公司内部技术人员分享研讨PPT.
- C# 线程--第二线程方法
概述 上一章节中和大家分享了线程的基础使用方法.在这一章中来和大家分享线程的一些常用方法. 主要包括:线程阻塞,线程终止,线程锁三方面. Thread 的 Sleep 和 Join 方法 Thread ...
- oracle手动启动服务
开始-控制面板->管理工具->服务->右键属性 oracle服务设定都是手动启动的,开机时只需要启动3个服务就好了: OracleOraDb11g_home1ClrAgent Ora ...
- 添加点标注IMarkerElement
private void AddPointElement(IPoint pPoint) { if (pPoint != null) { IElement pElement = null; IRgbCo ...