摘要: 在SharePoint2007下测试通过。使用SharePoint对象模型:SPFieldCollection collFields = list.Fields;//Update the calculated columnif (collFields.ContainsField("Document ID")){ collFields["Document ID"].Update();}使用Powershell:[System.Reflection.Assembly]::LoadWithPartialName(”Microsoft.SharePoint”)# 阅读全文
posted @ 2013-01-10 15:06 风影极光 阅读(333) 评论(0) 推荐(0) 编辑
摘要: 删除群组:错误的做法:foreach (SPGroup group in web.SiteGroups){ if (group.Name.ToLower() == grpName.ToLower()) { web.SiteGroups.Remove(grpName); }} 原因:当我们增加或删除集合中的条目(Item)时候,Enumerator枚举不知道数据集合中有多少个条目(Item)。正确的做法:for (int index = 0; index <= web.SiteGroups.Count... 阅读全文
posted @ 2013-01-10 13:31 风影极光 阅读(374) 评论(0) 推荐(0) 编辑