Creating List Instance Schema without list definition in SharePoint 2010/2013

Source:https://thoughtsonsphere.wordpress.com/2015/02/14/create-list-instance-without-list-definition/

1.Create List  on SharePoint with customization you want,

  a. Fields.

  b. List Settings

  c. Views

2.Save the list as template.

3.Download the list template and extract the manifest.xml

4.Create List Instance based on the same list type with previouse list and specify the CustomSchema property

 

5.Create Custom Schema file under the list instance folder.

  

6.Modify the deployment type for Schema.

  

7.Copy the content of xml node【List】from manifest.xml to schema

  

8.Modify Schema.

  a.Remove the name attribute containing List GUID of your previous List.

<List Name=”SomeGUid” …> remove this Name attribute, we don’t need this in our schema

  b.Replace the following  nodes <View>

<View BaseViewID=”1″ Type=”HTML” Level=”1″ ContentTypeID=”0x” WebPartZoneID=”Main” OrderedView=”TRUE” DisplayName=”All Links” DefaultView=”TRUE” MobileView=”TRUE” MobileDefaultView=”TRUE” SetupPath=”pages\viewpage.aspx” ImageUrl=”/_layouts/images/links.png” Url=”AllItems.aspx”>

  c.replace the Forms Node with the below one.

<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>

 

posted @ 2017-09-12 13:24  【上海】Peter  阅读(220)  评论(0)    收藏  举报