随笔分类 - SharePoint_Dev
摘要:场景1:添加List View Webpart //Add webpart in view by location SPList oList = web.Lists[Constant._CUSTOMER_CONTRACT_LIST_TITLE]; ListViewWebPart oListViewWebPart = new ListViewWebPart(); oListViewWebPart.ZoneID = "Left"; oListVie...
阅读全文
摘要:Unable to add selected web part(s). List View Web Part could not be added, list may be hidden.Issue: I created a custom list definition using the SharePoint Solution Generator. After deployment, when I tried to add a list view web part that points to my custom list, it gives me the above listed erro
阅读全文
摘要:function document.onkeyup() { if (window.event.keyCode == 9) { var fldAD = $(document).find(".ms-formtable").children().find("input[title='Title']")[0].value; if (fldAD != "") { GetUserProfileByName(fldAD); } }}$(document).ready(function () { });function GetU...
阅读全文
摘要:•Change “%7B” to “{” •Change all “%2D” to “-“•Chnage “%7D” to “}”XML中的编码对照:<", "<").Replace(">", ">建议对字符串进行如下处理:System.Web.HttpUtility.HtmlEncode(string input)
阅读全文
摘要:<?xml version="1.0" encoding="utf-8"?><xml> <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xs:element name="NewDataSet" ms
阅读全文
摘要:http://nikspatel.wordpress.com/2011/07/20/debug-browser-enabled-infopath-2010-forms-deployed-on-sharepoint-2010-using-visual-studio-2010/
阅读全文
摘要:the related identifier is mapped to field which is already marked as an identifier of this external content type.http://msdn.microsoft.com/en-us/library/ee558417.aspxhttp://msdn.microsoft.com/en-us/library/ff798500.aspx
阅读全文
摘要:问题描述:我们在开发工作流应用系统的时候,发现使用Workflow Task List作为主页webpart的list数据源时,没有合适的列让用户点击并在浏览器中打开InfoPath(xml文件)处理办法:使用SharePoint Designer 2007 打开页面文件,找到对应的webpart如下操作在Href后添加"?OpenIn=Browser"命令。
阅读全文
摘要:http://www.microsoft.com/download/en/details.aspx?=&HL=150624&CM=rss_click&CE=MSDN2462-150624&id=14154
阅读全文
摘要:问题描述:我在Nintex中使用了Request Approval动作,启动工作流后发生了错误,查找日志后发现如下信息10/13/2011 1:23 PMErrorSystem AccountException has been thrown by the target of an invocation.Error10/13/2011 1:23 PMErrorSystem AccountCannot find a corresponding human workflow task id for this task.Error解决方法:删除当前绑定的Workflow Task List,重新创建
阅读全文
摘要:一、增加第二数据源使用GetUserCollectionFromGroup Web Service二、修改数据源的定义文件2.1 解压缩xsn文件GetUserCollectionFromGroup, GetUserCollectionFromGroup1, GetUserCollectionFromGroup2. Open the GetUserCollectionFromGroup xsd and search for query fields. Replace that element with the following.2.2、修改<xsd:element name="
阅读全文
摘要:应用场景:在Parallel Activity中使用InvokeWorkflow来达到间接关闭并行分支的功能。TestInvokeWorkflow方法用于启动监听工作流。endinvoke方法用户关闭启动的监听工作流实例。 private void TestInvokeWorkflow(object sender, EventArgs e) { SPWeb web = SPContext.Current.Web; SPList list = web.Lists["TestList"]; SPWorkflowAss...
阅读全文
摘要:取消正在执行的Workflow instance。以下代码以properties来自EventReceiver中的上下文。SPSecurity.RunWithElevatedPrivileges(delegate() { using (SPSite site = new SPSite(properties.SiteId)) { using (SPWeb web = site.OpenWeb(properties.RelativeWebUrl)) { SPWorkflowManager manager = site.Work...
阅读全文
摘要:问题描述:我们经常在更新Item的时候,会触发工作流实例中的OnTaskChanged事件的自动触发。所以我们可以通过继承SPItemEventReceiver来解决这个问题。 SPItemEventReceiverHandling rh = new SPItemEventReceiverHandling(); try { rh.DisableEventFiring(); ...
阅读全文
摘要:因为经常需要提升权限来完成一件事情,特此封装为一个固定的方法来调用。 protected void RunWithElevatedPrivilegesAndContextSwitch(SPSecurity.CodeToRunElevated secureCode) { HttpContext backupContext = HttpContext.Current; HttpContext.Current = null; SPSecurity.RunWithElevatedPrivileges(secureCode)...
阅读全文
摘要:1 借助.net的调试技巧在代码中添加此行代码,当程序运行时会自动要求调试人员附加相关的进行。System.Diagnostics.Debugger.Launch();2 附加进行,设置断点进行调试。查看端口对应的进程有以下几种方式命令C:\WINDOWS\system32\inetsrv>appcmd.exe list wpwindbg使用VS附加进程可以直接附加所有进程查看任务管理器
阅读全文
摘要:问题描述:我们在不同的开发Server和Product环境中部署InfoPath的时候,发现命名空间会随InfoPath的小版本变化而变化。比如:http://schemas.microsoft.com/office/infopath/2003/myXSD/2011-03-14T09:12:19处理办法:使用Linq to xml 来获取。封装的方法如下:public static string GetXMLNameSpaceByPrefix(string outerXml, string prefix) { XElement xmlTree = XElem...
阅读全文
摘要:获取SPWeb实例方式一 if deployed on farm,we can get spweb by time job titleA define site url in feature template.xml as property,and access it in FeatureActivated eventstring url = properties.Feature.Properties[activeSiteUrl].Value;……job.Title = displayName + "(" + url.ToLower().Trim() + ")&q
阅读全文
摘要:应用场景:在请假系统中,需要一个Country列表和Task列表。Country列表作为元数据显示用户所属的国家。Task列表工作流审批使用,并且呈现Task的编辑aspx页面需要隐藏删除按钮。<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <!-- Country Content Type : Parent ContentType: Item (0x01)
阅读全文

浙公网安备 33010602011771号