无法在SharePoint Framework解决方案中创建列表实例 [英] Unable to create list instance in SharePoint Framework Solution
问题描述
我正在尝试创建一个引用实例,该实例引用具有基本列表架构的自定义Schema.xml文件.我正在尝试使用创建 SharePoint框架解决方案,当我执行该应用程序时未安装该应用程序,因为我指的schema.xml似乎存在一些问题.我已附上架构代码,供您参考.
I am trying to create a list instance referring a custom Schema.xml file which has the basic lists schema. I am trying to create this using SharePoint Framework Solution the app doesn't gets installed when i do it as the schema.xml i am referring seems to have some issue. I have attached the schema code which for your reference.
<?xml version="1.0" encoding="utf-8"?>
<List
xmlns:ows="Microsoft SharePoint"
Title="Basic List"
FolderCreation="FALSE"
Direction="$Resources:Direction;"
EnableContentTypes="FALSE"
Url="Lists/BasicList"
BaseType="0"
xmlns="http://schemas.microsoft.com/sharepoint/">
<MetaData>
<Fields>
<Field ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Type="Text" Name="Title" DisplayName="$Resources:core,Title;" Required="TRUE"
SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Title" MaxLength="255" />
</Fields>
<Views>
<View
BaseViewID="1"
Type="HTML"
WebPartZoneID="Main"
DisplayName="$Resources:core,objectiv_schema_mwsidcamlidC24;"
MobileView="True"
MobileDefaultView="True"
SetupPath="pages\viewpage.aspx"
Url="AllItems.aspx"
ReqAuth="TRUE">
<XslLink Default="TRUE">main.xsl</XslLink>
<JSLink>clienttemplates.js</JSLink>
<RowLimit Paged="TRUE">30</RowLimit>
<Toolbar Type="Standard" />
<ViewFields>
<FieldRef Name="Title"></FieldRef>
</ViewFields>
<Query>
<OrderBy>
<FieldRef Name="ID"></FieldRef>
</OrderBy>
</Query>
</View>
</Views>
<Forms>
<Form Type="DisplayForm" Url="DispForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
<Form Type="EditForm" Url="EditForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
<Form Type="NewForm" Url="NewForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
</Forms>
</MetaData>
</List>
推荐答案
您可以在SharePoint中找到配置列表实例的详细步骤在以下dev.office.com中的框架项目.
· 为您的SharePoint资产创建文件夹结构
· Create folder structure for your SharePoint assets
· 创建用于初始部署的功能框架文件
· Create feature framework files for initial deployment
1. 为SharePoint定义添加element.xml文件
1. Add element.xml file for SharePoint definitions
2. 添加用于定义列表结构的schema.xml文件
2. Add schema.xml file for defining list structure
· 确保在构建管道中使用了定义
· Ensure that definitions are taken into use in build pipeline
https://dev.office.com/sharepoint/docs /spfx/web-parts/get-started/provision-sp-assets-from-package
最好的问候,
Lee
这篇关于无法在SharePoint Framework解决方案中创建列表实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!