DataSource 元素(列表实例)

适用于:SharePoint 2016 |SharePoint Foundation 2013 |SharePoint Online |SharePoint Server 2013

指定用于设置列表实例的数据源。

定义

<DataSource>
  <Property />
</DataSource>

元素和属性

下面各部分介绍了属性、子元素和父元素。

Attributes

子元素

Property 元素(列表实例)

父元素

ListInstance 元素(列表实例)

出现次数

最小值:0

最大值:1

备注

DataSource 元素必须至少具有一个 Name 参数设置为“Service”的子 Property 元素。 如果某个中间层服务(Microsoft 的业务数据连接 (BDC) 服务)用于将外部数据引入 SharePoint 外部列表,则其他服务的文档必须为您提供服务名称 (Property 元素的 Value 参数的值) ,以及有关哪些其他 Property 元素可能作为 DataSource 元素的子元素可能允许或需要的信息。 如果使用 BDC,请使用“Business 数据目录”作为 Value 参数的值。

此外,如果使用 BDC,则必须具有 DataSource 元素的其他四个 Property 元素子级,其 Name 属性具有以下示例中显示的值。

    <DataSource>
          <Property Name="Service" Value="Business Data Catalog" />
          <Property Name="Entity" Value="Friendly name of external content type (entity)" />
          <Property Name="EntityNamespace" Value="Fully qualified namespace of the class that defines the external content type (entity)" />
          <Property Name="LobSystemInstance" Value="NameOfExternalDataSource" />
          <Property Name="SpecificFinder" Value="Name of method that reads a single item; for example ReadItem" />
    </DataSource>