
MOSS
匆匆过客121
IT工作者,爱好编程
展开
-
SharePoint CAML 通过SPUser.ID查询用户资料
SharePoint开发过程中,经常需要使用CAML查询列表的资料。而当查询条件中有用户和用户组栏位,默认的查询是使用SPUser.Name进行查询的。但是在一个网站集中,SPUser.Name有可能重复,这样查询出来的数据有误了。往往,我们需要使用精确的查询一个用户的资料,SPUser唯一的属性就是ID和LoginName了。使用LookupId=true便可以查询到你自定的用户转载 2011-10-06 11:04:48 · 495 阅读 · 0 评论 -
SharePoint: In a CAML query, filter by lookup item ID, not by its value
Your filter for the CAML query probably looks like this currently: Dunder Mifflin But the "Customer" field is a lookup column to a d转载 2011-11-15 15:09:47 · 1087 阅读 · 0 评论 -
在SPItemEventReceiver中使用BeforeProperties和AfterProperties
正如你所知道的,事件接收器(EventHandler)非常强大,可以挂在许多SharePoint事件上。它们可以应用于功能 (Feature)事件,如FeatureActivated,列表事件,如FIEldAdded,等等。然而,其中我们最常用的还是 SPItemEventReceiver中的一系列接收器。通过继承该类,我们可以把自己的代码挂接在列表项或文档库文档上发生的一系列事件上。 当你转载 2013-03-07 16:11:48 · 789 阅读 · 0 评论 -
Create a New SharePoint Permission Level and Bind it to an Existing SharePoint Group
Create a New SharePoint Permission Level and Bind it to an Existing SharePoint Group 这个例子是新建一个 permission level,名字为Example_xxxxxxxxxxx.建好之后.绑定这个permission level 到一个已经存在的组名字为Foo.using (SPSite site转载 2011-11-17 11:39:28 · 792 阅读 · 0 评论 -
如何快速找到网站集所在w3wp进程
调试Feature时,可以通过 附加到进程 来做,timer是 附加到 owstimer.exe ,其他的一般都是附加到 w3wp.exe. 但进程中往往会有多个w3wp.exe 进程. 很多人对于MOSS开发有个很烦的地方就是在调试WebPart或者EventHandler之类的MOSS自定义组件时找不到部署的网站集所对应的w3wp.exe进程。在Windows文件夹中的system原创 2011-11-17 08:53:57 · 674 阅读 · 0 评论 -
获取当前sharepoint站点集中的登录用户及在workflow里获取当前登录用户
1.获得当前用户SPUser spuser = Microsoft.SharePoint.WebControls.SPControl.GetContextWeb(Context).CurrentUser;SPUser currentUser = Micro转载 2011-09-30 10:15:57 · 1271 阅读 · 0 评论 -
hyperlink column and a user column
To Store values to User Field and URL Field, we have to store in different format.Because the The User Field is a Lookup Field, getting va转载 2011-09-28 15:15:13 · 434 阅读 · 0 评论 -
利用代码给SPUSER字段赋值
using (SPSite site = new SPSite("http://site")) { using (SPWeb web = site.AllWebs["Web"]) { SPList list = web.Lists["List"];转载 2011-10-17 12:57:04 · 651 阅读 · 0 评论 -
Submitting to 'this' document library 提交Infopath 表单至当前目录
Have you ever needed to develop an InfoPath form template that submits back to a SharePoint document library but you did not initially know转载 2011-10-06 13:10:35 · 915 阅读 · 1 评论 -
在Workflow 中读取提交的申请单的内容
可以通过提升申请单的field,然后通过操作SPListItem来操作字段 (workflowProperties.Item 为对应的 SPListItem) 也可以通过直接读取源xml文件来处理.http://topic.youkuaiyun.com/u/20090904/16转载 2011-10-14 15:07:47 · 449 阅读 · 0 评论 -
Approval Status 审批状态的修改_ModerationStatus
using (SPSite oSiteCollection = new SPSite("http://localhost")){ SPWebCollection collWebsites = oSiteCollection.AllWebs; forea原创 2011-10-13 15:40:06 · 1889 阅读 · 0 评论 -
使用编程的方式来启动SharePoint的工作流 并传入参数
(1) Define one class with propertiesusing System.Xml.Serialization;using System.Xml;using System.IO;[Serializable()]public class Wo转载 2011-10-13 08:33:31 · 480 阅读 · 0 评论 -
Sharepoint ListTemplateId
If you want to add a Event Handler Assembly to a specific list in Sharepoint with a Feature you have to pass a ListTemplateId.EventHandler DeleteItemDeleting…Here's a little code转载 2011-11-21 11:26:43 · 639 阅读 · 0 评论 -
SharePoint向InfoPath 2007表单传递参数
在调用模板的地方,在链接上增加相应参数。 添加自定义代码到表单模板的Loading事件,通过InputParameters属性返回Idictionary,并利用其TryGetValue方法获取参数值。当确实得到参数值后,我们可以使用XpathNavigator对象的SetValue方法更新表单数据源中的某个结点值 public void FormEvents_Loading(objec原创 2011-11-08 10:24:12 · 569 阅读 · 0 评论 -
Infopath 开发并部署至MOSS 示例
Infopath是Office中提供的一个部件,可以方便快捷的处理一些表单。比较常见的使用就是会计可以利用Infopath制作一个表单模板,需要报销的人直接填写就可以了,填写好的表单可以xml的格式保存为本地的一个表单文件。同时也可以将Infopath表单模板在web页面上来呈现和填写。在MOSS中提供了InfoPath Forms Services功能可以方便的发布Infopath表单,当然转载 2011-11-08 10:52:46 · 570 阅读 · 0 评论 -
Sharepoint:The security validation for this page is invalid. Click Back in your Web browserSharepoin
Sometimes while trying to delete documents or move documents from one library to another we get an error "The security validation for this page is invalid. Click Back in your Web browser, refresh the转载 2013-08-12 11:29:53 · 934 阅读 · 0 评论 -
无法打开workflow的设计界面--缺'System.Workflow.ComponentModel.Compiler.ITypeProvider'
The service 'System.Workflow.ComponentModel.Compiler.ITypeProvider' must be installed for this operation to succeed To fix this issue you have to edit your project file:Project>Prope原创 2012-10-19 13:24:25 · 957 阅读 · 0 评论 -
This Task Is Currently Locked by a Running Workflow and Cannot Be Edited
Problem: In SharePoint Workflow, "This task is currently locked by a running workflow and cannot be edited" is the common exception, that we face.Solution: Generally this exception occurs 1. wh转载 2012-01-09 09:36:29 · 2001 阅读 · 0 评论 -
控制infopath表单关闭后跳转的页面
系统会根据打开表单的 url 里的 source 参数来跳转,所以如果要控制打开表单的 url ,只要修改相应 source 参数即可. 获取上一页地址:System.Web.HttpContext.Current.Request.ServerVariables["HTTP_REFERER"]; 跳转://Redirect to specified page, adding原创 2011-09-30 10:32:38 · 732 阅读 · 0 评论 -
读取InfoPath中的附件并附加至SharePoint列表
在Workflow 中,签核完成后,在列表中生成一笔记录,并且将表单的附件附加到该记录中。1. 新建 coder 类. http://support.microsoft.com/kb/892730using System;using System.IO;using System.Text;using System.Security.Cryptography;namesp原创 2011-11-07 11:23:22 · 793 阅读 · 0 评论 -
CAML语法-Query写法
CAML语法-Query写法1.Geq(>=) The Geq element is an arithmetic operator that means "greater than or equal to." It can be used within a Where element in a view definition.原创 2011-11-02 14:41:36 · 985 阅读 · 0 评论 -
Clear the SharePoint Configuration Cache
If you experience issues with WSS and MOSS timer jobs failing to complete are receiving errors trying to run psconfig, clearing the configuration cache on the farm is a possible method for resolving t转载 2011-11-10 16:15:58 · 564 阅读 · 0 评论 -
关于SPList的Update及AllowUnsafeUpdates
通过SPList.Update()可以更新一个List,但一般你是不能直接调用此方法的,会出现“Updates are currently disallowed on GET requests. To allow updates on a GET, set the 'AllowUnsafeUpdates' property on SPWeb.”解决方法有两个:1。设置 AllowUnsaf原创 2011-11-30 15:19:46 · 724 阅读 · 0 评论 -
CAML 多表查询 SPQuery.Joins and ProjectedFields
在2007 不支持,2010支持. Demo:字典表:CityState表: 标题(Text) State(Text) AreaCode(num)Locations表: 标题(Text) City (Text) zipCode (num)Customer表: CustomerName(Text) Address(Text) City(Lookup) St转载 2011-11-08 09:56:04 · 1269 阅读 · 0 评论 -
怎样让InfoPath表单的连接 强制在浏览器中打开
在表单的连接后面 追加一个参数(?OpenIn=browser)即可解决问题,例如:表单URL为: http://server-name/webapp/libname/20090115-094801.xml在后面追加: http://server-name/webap原创 2011-09-30 10:25:11 · 831 阅读 · 0 评论 -
[Sharepoint]How to Complete Task using code and send to next task
为了实现批量签核,需在代码中实现完成task并自动生成下一步task的功能.先在Task列表中找到相应的task记录, 如下代码中是 taskListItem , 且在工作流中有一个 checkbox 域-- Result 来标记签核结果Hashtable data =原创 2011-09-22 11:08:31 · 902 阅读 · 0 评论 -
sharepoint中使用PeopleEditor控件为列表项赋值示例
sharepoint中使用PeopleEditor控件示例 protected void Page_Load(object sender, EventArgs e){ try { SPWeb web = SPContext.Cur转载 2011-09-14 14:33:57 · 1003 阅读 · 0 评论 -
Creating Custom Timer Jobs in Sharepoint
查了很多资料,终于成功,记录下以备查阅。1.首先建一个类库工程,建一个类文件用于定时器的处理,主要是继承SpJobDefinition,改写几个构造体和Execute的方法.基本代码的模式就是这个样子:文件名为mosstimer001.csusing System原创 2011-08-12 09:37:14 · 548 阅读 · 0 评论 -
如何:访问工作流中的关联和初始表单数据
http://msdn.microsoft.com/zh-cn/library/ms566880.aspx提取 InfoPath 关联或初始表单的架构。在 InfoPath 中打开已保存和发布的工作流表单。 若要将表单保存为源文件,请在“文件”转载 2011-09-07 11:41:41 · 587 阅读 · 0 评论 -
[SharePoint WorkFlow InfoPath]在InfoPath表单内提交表单并启动工作流
MOSS中对工作流的强大支持,让我们可以做很多应用。举个例子,我们可以用表单库做审批表单,然后给这个表单库附加一个流程。我们可能希望用户在填写表单的时候,在表单中填一些在启动工作流时需要用的信息,比如设置审批人等等。我们的表单会像下面这样,包括待审批内容,和设置审批者转载 2011-09-07 11:52:13 · 1089 阅读 · 0 评论 -
Accessing columns in the User Information List
I was recently asked how to programmatically retrieve custom fields from the User Information List via a Web service.It turns out that the转载 2011-09-08 11:11:21 · 561 阅读 · 0 评论 -
用代码访问InfoPath表单内容
表单是MOSS的一个很重要的特性,特别是有了Form Services的支持后,我们在做表单解决方案的时候,经常会用到Infopath, 那么如何使用代码访问保存于SharePoint表单库中的InfoPath表单的内容,是必需知道的。总结了下,有如下3种方式可实现代码对表单转载 2011-09-08 13:19:20 · 687 阅读 · 0 评论 -
如何在InfoPath表单中引用SQL SERVER 中的数据?
1 为什么要这么做,要引用后台的数据干嘛?当你打开一个基于浏览器的表单时,表单中的一些下拉式控件,比如"商品类型","材料规格",你可能不希望读者自己输入,而希望直接从系统原有的SQL SERVER中的"商品类型表"读取。或者,你希望完成一些"自动填写"操作,比如当输转载 2011-09-08 16:57:26 · 1980 阅读 · 0 评论 -
[SharePoint 2007]如何解决上传InfoPath表单时一直处于正在安装状态的问题
[SharePoint 2007]如何解决上传InfoPath表单时一直处于正在安装状态的问题众所周知要在SharePoint 2007中使用包含代码的InfoPath表单时,必须将表单模板上传到管理中心才行,不知道大家有没有遇到过下面这种问题,当上传表单后,其状态一转载 2011-09-14 14:37:23 · 621 阅读 · 0 评论 -
在工作流中使用自定义表单
需要在feature.xml中添加如下配置。 在workflow.xml的MetaData节点下添加如下配置。urn:schemas-microsoft-com:office:infopath:StateApprovalForm:-myXS原创 2011-09-14 16:44:08 · 1141 阅读 · 3 评论 -
配置 Office SharePoint Server 2007
配置 Office SharePoint Server 2007: MOSS 2007安装完毕后,还需要进行相关的配置,才能正常使用。这一阶段很关键,我们具体来看:启动“SharePoint产品和技术配置向导”: 配置向导会自动提示,配置过程中将会需要重启某些系统原创 2011-08-12 10:08:32 · 591 阅读 · 0 评论 -
Add a logo from a SharePoint library to an InfoPath browser form
If you have a Rich Text Box control named logo on a browser-compatible InfoPath form template, and you want to display an image namedlogo.jp转载 2011-09-14 11:27:33 · 340 阅读 · 0 评论 -
SharePoint(WSS)学习-- 添加ASPX页面
往sharepoint中添加aspx页面有几种方式1.在designer中添加好页面,然后加上后台代码参考: http://bbs.winos.cn/thread-36766-1-1.html为sharepoint页面添加后台代码我们知道,存储在数原创 2011-09-14 11:22:12 · 1328 阅读 · 0 评论 -
SharePoint - Register an assembly as a safe control in the Web.config file
SharePoint - Register an assembly as a safe control in the Web.config fileIn order for you to use your own custom assembly with your web p转载 2011-09-14 09:06:33 · 727 阅读 · 0 评论 -
Bulk Editing Workflow Tasks in Office SharePoint Services 2007
OK, we're back. Since it's now officially 2007, it seemed appropriate to focus my first entry of the New Year on Office SharePoint Server 20转载 2011-09-22 11:09:51 · 366 阅读 · 0 评论