secce 发表于 2015-9-25 10:36:53

Sharepoint开发笔记

自定义List Definition
  右键单击ListDefinition文件夹

  弹出

  Add,根据向导提示

  新建的ListDefinition\Elements.xml文件中的<ListTemplate>元素的Type属性值在ListDefinition文件夹中必须唯一。(每次新建时,VS会自动递增,当你复制时,就要注意一下了)

  配置Scheam.xml时注意:

SharePoint项目分层
  项目如果是分层如entity\Services层时,framework版本最高只支持fx3.5.且entity\services必须是强命名的程序集。
如何把entity\Service程序集,添加到SharePoint项目中?

  点击高级-添加-Add-Add Assembly from Project Output..

  

  若在SharePoint项目中使用entity\services程序集中的元素,还是和web form 一样的添加程序集引用即可。
如何删除List?

  点击要删除的列表(erpnew),再点击 列表工具->列表设置->(如下图)权限和管理->点击"删除此列表"

  Sharepoint WebParts 部暑后怎么使用啊?
  单击网站操作->编辑网页


  
  

  如果配置新机器怎么访问SharePoint网站集?
  网站操作->网站设置



SharePoint 中的dropdownlist源scheam.xml如何配置?
Moss CAML中写查询语句时严格区分大小写。但对表达式中的单引号有没有没有并不影响。

在SharePoint中建立主从关系的List结构?
  在新建List列时,

如何使用Stramit Caml Viewer 生成查询条件语句块?
  先在SharePoint中新建视图,然后在Stramit Caml Viewer中点击View,复制Query语句块中的Where语句块即可。
  
在发布项目之前,需要先激活"SharePoint Server 发布"服务。如果没有需要删除网站,再新建网站后,再去激活服务。


Cannot add the specified assembly to the global assembly cache:
  重启下面服务,重新Package -> shell add solution

  或者说,临时不使用该dll时,从package中拿掉.
  
当打开管理中心要求输入验证
  机器名\帐户名
  密码
  Example :dc02-vweb-t05\portaldev02 123456
  Web部件错误,此网页上的某个Web

  关于Lookup类型的查询

[*]直接根据文本查找:
  <Query>
      <Where>
        <Eq>
              <FieldRefName ="Customer"/>
              <ValueType ="Text">
                  Dunder Mifflin
              </Value>
        </Eq>
      </Where>
  </Query>
  

[*]根据关联的ID查找:
  <Query>
      <Where>
        <Eq>
              <FieldRefName ="Customer"LookupId="true" />
              <ValueType ="Lookup">
                  15
              </Value>
        </Eq>
      </Where>
  </Query>
  
  参考文献: http://www.vishalseth.com/post/2009/12/02/SharePoint-In-a-CAML-query-filter-by-lookup-item-ID-not-by-its-value.aspx
  http://www.c-sharpcorner.com/Blogs/2018/sharepoint-list-lookup-column-indexing-and-caml-query-relati.aspx
  无法显示此视图,由于其包含的查阅和工作流状态栏数超出了管理员强制实施的阈值(8)。

[*]Sharepoint管理中心->应用程序管理->Web应用程序
[*]选择一个名称,例'Sharepoint-80'
[*]菜单'常规设置'->资源限制

  MOSS资源网站
  https://store.bamboosolutions.com/kb/article.aspx?id=12396
  
  SharePoint查阅项(Lookup)字段多值格式
  SharePoint查阅项(Lookup)字段取值如果是多个值(复选)组合而成,对多个值之间的分割方式,在2010和之前版本中有所不同。如下:
  SharePoint 2010:{value1};#{ID1};#{value2};#{ID2}
  SharePoint 2007及以前版本:{ID1};#{value1}{ID2};#{value2}
  查询get Lookup field id
  // ConvertToLookupValue(CommonUtil.GetFieldVal(item, "Ent1"));
  privatestaticSPFieldLookupValue ConvertToLookupValue(string lookupField) {
  //item["Ent1"].ToString().Split(";#".ToArray())
  //{string}
  //    : "1"
  //    : ""
  //    : "上海华普电缆有限公司"
  if (string.IsNullOrEmpty(lookupField)) returnnull;
  string[] vals = lookupField.Split(";#".ToArray());
  return (vals.Length == 3) ? newSPFieldLookupValue(Convert.ToInt32(vals), vals) : null;
  }
页: [1]
查看完整版本: Sharepoint开发笔记