小编Red*_*zio的帖子

Sharepoint 2010 - 将示例数据添加到用户字段类型

您好StackOverflow会员!

我在Visual Studio中开发了自定义列表(通过XML).我创建了列表定义(包含内容类型)并向其添加了列表实例.

这是我的列表的schema.xml:

<?xml version="1.0" encoding="utf-8"?>
<List xmlns:ows="Microsoft SharePoint" Title="Teams" EnableContentTypes="TRUE"  FolderCreation="FALSE" Direction="$Resources:Direction;" Url="Lists/Teams" BaseType="0" xmlns="http://schemas.microsoft.com/sharepoint/">
 <MetaData>
<ContentTypes>
  <ContentTypeRef ID="0x010089E3E6DB8C9B4B3FBB980447E313DE94" />
</ContentTypes>
<Fields>
  <Field Type="User" Name="Employee" DisplayName="Employee" Required="TRUE" ID="{7B18E941-BAAD-453A-895C-39579AB5A9F1}"  Group="Sample Group" />
  <Field Type="Boolean" Name="Manager" DisplayName="Manager" ID="{9FC927CC-45EB-4E9E-8F25-18AAEDF7DCAF}"  Group="Sample Group" />
</Fields>
<Views>
  <View BaseViewID="0" Type="HTML" MobileView="TRUE" TabularView="FALSE">
    <Toolbar Type="Standard" />
    <XslLink Default="TRUE">main.xsl</XslLink>
    <RowLimit Paged="TRUE">30</RowLimit>
    <ViewFields>      
      <FieldRef  Name="Employee" />
      <FieldRef  Name="Manager" />
    </ViewFields>
    <Query>
      <OrderBy>
        <FieldRef Name="Modified" Ascending="FALSE"></FieldRef>
      </OrderBy>
    </Query>
    <ParameterBindings>
      <ParameterBinding Name="AddNewAnnouncement" Location="Resource(wss,addnewitem)" />
      <ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" />
      <ParameterBinding …
Run Code Online (Sandbox Code Playgroud)

sharepoint sharepoint-2010

4
推荐指数
1
解决办法
1万
查看次数

标签 统计

sharepoint ×1

sharepoint-2010 ×1