09 2011 档案
摘要:1. when updating field which lookups from Content Types, (for example: set Required to Yes), it needs update Content Types first. please read this article: http://www.novolocus.com/2010/10/28/programmatically-making-a-field-required-in-sharepoint-2007/2. Configuration: A. Set"Allow management o
阅读全文
摘要:In a scenario where you need to create Content Type in bunch, there comes the role of Dynamic Content types.The following code snippet helps you in creating content type dynamically.Code:using System;using Microsoft.SharePoint;namespace DynamicContentTypeConsole{ class Program { static void Main(str
阅读全文
摘要:如何向列表中插入数据?这是一个很简单的问题。那么我的这两篇文章主要是对各种方法的总结,如果有朋友有不同的意见,请指正。首先,我们来看一下列表(自定义列表,列表名称:Jobs).列名类型注释Title单行文本JobDescription多行文本City选择项DueDate日期JobRequirementLookup类型指向另一个列表:SkillsManager人员管理员添加数据的方法我总结为三种。通过界面添加;使用Workspace 2010添加; 使用Powershell命令添加。以下是依次的详细内容或者截图:1. 界面添加: 2. 使用workspace 2010添加。(前提:你需要安装Sh
阅读全文
摘要:SharePoint 2010中增加了对ADO.NET Service的支持。我们可以通过REST的方式来添加,查询或者更新数据。这篇文章,我将尝试使用REST的方式来查询,并且添加一条记录。准备工作:开始使用代码之前,记得要添加对 http://servername/_vti_bin/listdata.svc 服务的引用。我是引用之后,将其命名为“ListDataSR”, 一下是详细代码。(我是在控制台程序中运行这段代码的)ListDataSR.SPFLearnDataContext ctx = new ListDataSR.SPFLearnDataContext( ...
阅读全文
摘要:上一篇中,我列举了几种管理员或者一般用户添加列表项的方式。这一篇我将从开发者的角度来完成这个操作。作为开发人员添加列表项的方式主要有如下几种:(服务器端)对象模型,客户端对象模型以及Web Service.1. (服务器端)对象模型。这种是开发中最常见的,可以是一个控制台程序,也可以写到你的Web Part或者Event Handler里面 1: static void AddNewItem() 2: { 3: using (SPSite site = new SPSite("http://server")) 4: ...
阅读全文
摘要:1. 对于Lookup Field,Caml 语句如下:<Query><Where> <Contains> <FieldRef Name="AlertLocation" LookupId="TRUE" /> <Value Type="text">1</Value> </Contains></Where></Query> “1”代表 ID, Lookup List ItemID2. 如果没有Filter出来, 可以考虑把Name=
阅读全文
摘要:When lookup fields are created, sharepoint stores them asID;#Value format in related list.for e.g.in list “Contacts” there is column called “Country”.There is item in contact with value “India” assigned in Country, having item ID=10.Now for another list “List2″ when column “Country” is stored as Loo
阅读全文
摘要:Even though Microsoft encourages using LINQ in SharePoint 2010, they introduced some new CAML Query schema elements. They are· IN· INCLUDES· NOT INCLUDESIN:This is something work as same as what we see in SQL Query. We can provide a collection of Items to filter. Previously in SharePo
阅读全文
摘要:1. http://msdn.microsoft.com/en-us/library/bb862071.aspx;2. http://office.microsoft.com/en-us/windows-sharepoint-services-help/examples-of-common-formulas-HA001160947.aspx;
阅读全文

浙公网安备 33010602011771号