I am creating a HierarchyTasksList with a custom schema. When I add an extra view with a BaseViewId="10" or any other not used number I get an error. However when I change the BaseViewId to "1". Everything works fine. Why is this happening?
I am using SP2013.
My List instance
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<ListInstance Title="Tasks"
OnQuickLaunch="TRUE"
TemplateType="171"
FeatureId="f9ce21f8-f437-4f7e-8bc6-946378c850f0"
Url="Lists/Taken"
CustomSchema="LITaken\Schema.xml">
</ListInstance>
</Elements>
My Schema
<?xml version="1.0" encoding="utf-8"?>
<List xmlns:ows="Microsoft SharePoint" Title="Hierarchy tasks" FolderCreation="FALSE" Direction="$Resources:Direction;" EnableContentTypes="TRUE" Url="Lists/Taken" BaseType="0">
<MetaData>
<ContentTypes>
<ContentTypeRef ID="0x0108">
<Folder TargetName="Task" />
</ContentTypeRef>
</ContentTypes>
<Fields>
<Field Name="LinkTitle" ID="{82642ec8-ef9b-478f-acf9-31f7d45fbc31}" DisplayName="$Resources:core,Task_Name;" Sealed="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="LinkTitle" />
<Field Name="LinkTitleNoMenu" ID="{bc91a437-52e7-49e1-8c4e-4698904b2b6d}" DisplayName="$Resources:core,Task_Name;" Sealed="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="LinkTitleNoMenu" />
<Field Name="Title" ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" DisplayName="$Resources:core,Task_Name;" Sealed="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Title" />
<Field ID="{c3a92d97-2b77-4a25-9698-3ab54874bc6f}" Name="Predecessors" Type="LookupMulti" Mult="TRUE" Required="FALSE" DisplayName="$Resources:core,Tasks_Predecessors;" StaticName="Predecessors" List="Self" ShowField="Title" DisplaceOnUpgrade="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3">
</Field>
<Field ID="{a8eb573e-9e11-481a-a8c9-1104a54b2fbd}" Type="Choice" Name="Priority" DisplayName="$Resources:core,Priority;" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Priority">
<CHOICES>
<CHOICE>$Resources:core,Priority_High;</CHOICE>
<CHOICE>$Resources:core,Priority_Normal;</CHOICE>
<CHOICE>$Resources:core,Priority_Low;</CHOICE>
</CHOICES>
<MAPPINGS>
<MAPPING Value="1">$Resources:core,Priority_High;</MAPPING>
<MAPPING Value="2">$Resources:core,Priority_Normal;</MAPPING>
<MAPPING Value="3">$Resources:core,Priority_Low;</MAPPING>
</MAPPINGS>
<Default>$Resources:core,Priority_Normal;</Default>
</Field>
<Field Type="Choice" ID="{c15b34c3-ce7d-490a-b133-3f4de8801b76}" Name="Status" DisplayName="$Resources:core,TaskStatus;" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Status">
<CHOICES>
<CHOICE>$Resources:core,Tasks_NotStarted;</CHOICE>
<CHOICE>$Resources:core,Tasks_InProgress</CHOICE>
<CHOICE>$Resources:core,Tasks_Completed</CHOICE>
<CHOICE>$Resources:core,Tasks_Deferred</CHOICE>
<CHOICE>$Resources:core,Tasks_Waiting</CHOICE>
</CHOICES>
<MAPPINGS>
<MAPPING Value="1">$Resources:core,Tasks_NotStarted;</MAPPING>
<MAPPING Value="2">$Resources:core,Tasks_InProgress</MAPPING>
<MAPPING Value="3">$Resources:core,Tasks_Completed</MAPPING>
<MAPPING Value="4">$Resources:core,Tasks_Deferred</MAPPING>
<MAPPING Value="5">$Resources:core,Tasks_Waiting</MAPPING>
</MAPPINGS>
<Default>$Resources:core,Tasks_NotStarted;</Default>
</Field>
<Field Type="Number" Name="PercentComplete" ID="{d2311440-1ed6-46ea-b46d-daa643dc3886}" Percentage="TRUE" Min="0" Max="1" DisplayName="$Resources:core,Percent_Complete;" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="PercentComplete">
<Default>0</Default>
</Field>
<Field ID="{53101f38-dd2e-458c-b245-0c236cc13d1a}" Type="UserMulti" List="UserInfo" Name="AssignedTo" Mult="TRUE" Sortable="FALSE" ShowField="ImnName" DisplayName="$Resources:core,Assigned_To;" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="AssignedTo">
</Field>
<Field ID="{7662cd2c-f069-4dba-9e35-082cf976e170}" Type="Note" RichText="TRUE" RestrictedMode="TRUE" RichTextMode="FullHtml" Name="Body" DisplayName="$Resources:core,Description;" Sortable="FALSE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Body">
</Field>
<Field ID="{64cd368d-2f95-4bfc-a1f9-8d4324ecb007}" Type="DateTime" Name="StartDate" DisplayName="$Resources:core,Start_Date;" Format="DateOnly" FriendlyDisplayFormat="Relative" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="StartDate">
</Field>
<Field Type="DateTime" ID="{cd21b4c2-6841-4f9e-a23a-738a65f99889}" Name="DueDate" DisplayName="$Resources:core,Due_Date;" Format="DateOnly" FriendlyDisplayFormat="Relative" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="DueDate">
</Field>
<Field Type="Lookup" Indexed="TRUE" Name="ParentID" ID="{fd447db5-3908-4b47-8f8c-a5895ed0aa6a}" Hidden="TRUE" Required="FALSE" List="Self" RelationshipDeleteBehavior="Cascade" ShowField="ID" DisplayName="$Resources:core,Parent_ID;" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="ParentID">
</Field>
<Field Type="Calculated" Name="Checkmark" ID="{ebf1c037-47eb-4355-998d-47ce9f2cc047}" Required="FALSE" ResultType="Boolean" ReadOnly="TRUE" DisplayName="$Resources:core,Check_Mark_Field;" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Checkmark">
<Formula>=PercentComplete>=1</Formula>
<FieldRefs>
<FieldRef Name="PercentComplete" />
</FieldRefs>
</Field>
<Field Type="RelatedItems" Name="RelatedItems" ID="{d2a04afc-9a05-48c8-a7fa-fa98f9496141}" ShowInDisplayForm="TRUE" ShowInNewForm="FALSE" ShowInEditForm="FALSE" DisplayName="$Resources:core,Related_Links_Field;" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="RelatedItems">
</Field>
<Field Type="UserMulti" List="UserInfo" ID="{1982e408-0f94-4149-8349-16f301d89134}" Name="PreviouslyAssignedTo" Mult="TRUE" Hidden="TRUE" DisplayName="$Resources:core,Previously_Assigned_To_Field;" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="PreviouslyAssignedTo">
</Field>
</Fields>
<Views>
<View BaseViewID="0" Type="GANTT">
<XslLink Default="TRUE">main.xsl</XslLink>
<Toolbar Position="After" Type="Freeform">
<IfHasRights>
<RightsChoices>
<RightsGroup PermAddListItems="required" />
</RightsChoices>
<Then>
<HTML><![CDATA[<div class="tb"><img src="/_layouts/15/images/caladd.gif?rev=23" alt="" /> <a class="ms-addnew" id="idAddNewTask" href="]]></HTML>
<URL Cmd="New" />
<HTML><![CDATA[" onclick="javascript:NewItem(']]></HTML>
<ScriptQuote NotAddingQuote="TRUE">
<URL Cmd="New" />
</ScriptQuote>
<HTML><![CDATA[', true);javascript:return false;" target="_self">]]></HTML>
<HTML>$Resources:core,addnewitem;</HTML>
<HTML><![CDATA[</a></div>]]></HTML>
</Then>
</IfHasRights>
</Toolbar>
<RowLimit Paged="TRUE">100</RowLimit>
<ViewFields>
<FieldRef Name="LinkTitle">
</FieldRef>
<FieldRef Name="StartDate">
</FieldRef>
<FieldRef Name="DueDate">
</FieldRef>
<FieldRef Name="PercentComplete">
</FieldRef>
<FieldRef Name="Predecessors">
</FieldRef>
<FieldRef Name="AssignedTo">
</FieldRef>
<FieldRef Name="GUID">
</FieldRef>
</ViewFields>
<ViewData>
<FieldRef Name="Title" Type="GanttTitle">
</FieldRef>
<FieldRef Name="StartDate" Type="GanttStartDate">
</FieldRef>
<FieldRef Name="DueDate" Type="GanttEndDate">
</FieldRef>
<FieldRef Name="PercentComplete" Type="GanttPercentComplete">
</FieldRef>
<FieldRef Name="Predecessors" Type="GanttPredecessors">
</FieldRef>
<FieldRef Name="ParentID" Type="HierarchyParentID">
</FieldRef>
<FieldRef Name="DueDate" Type="TimelineDueDate">
</FieldRef>
</ViewData>
</View>
<View BaseViewID="1" Type="HTML" WebPartZoneID="Main" DisplayName="$Resources:core,All_Tasks;" MobileView="True" MobileDefaultView="True" Url="AllItems.aspx" SetupPath="pages\viewpage.aspx" DefaultView="TRUE" ImageUrl="/_layouts/15/images/issuelst.png?rev=23">
<JSLink>hierarchytaskslist.js</JSLink>
<XslLink Default="TRUE">main.xsl</XslLink>
<JSLink>clienttemplates.js</JSLink>
<RowLimit Paged="TRUE">100</RowLimit>
<Toolbar Type="Standard" />
<ViewFields>
<FieldRef Name="Checkmark">
</FieldRef>
<FieldRef Name="LinkTitle">
</FieldRef>
<FieldRef Name="DueDate">
</FieldRef>
<FieldRef Name="AssignedTo">
</FieldRef>
</ViewFields>
<ViewData>
<FieldRef Name="PercentComplete" Type="StrikeThroughPercentComplete">
</FieldRef>
<FieldRef Name="DueDate" Type="TimelineDueDate">
</FieldRef>
</ViewData>
<Query />
</View>
<View BaseViewID="2" Type="HTML" WebPartZoneID="Main" DisplayName="$Resources:core,Late_Tasks;" MobileView="True" MobileDefaultView="False" Url="late.aspx" ReqAuth="TRUE" SetupPath="pages\viewpage.aspx" ImageUrl="/_layouts/15/images/issuelst.png?rev=23">
<JSLink>hierarchytaskslist.js</JSLink>
<XslLink Default="TRUE">main.xsl</XslLink>
<JSLink>clienttemplates.js</JSLink>
<RowLimit Paged="TRUE">100</RowLimit>
<Toolbar Type="Standard" />
<ViewFields>
<FieldRef Name="Checkmark">
</FieldRef>
<FieldRef Name="LinkTitle">
</FieldRef>
<FieldRef Name="DueDate">
</FieldRef>
<FieldRef Name="AssignedTo">
</FieldRef>
</ViewFields>
<ViewData>
<FieldRef Name="PercentComplete" Type="StrikeThroughPercentComplete">
</FieldRef>
<FieldRef Name="DueDate" Type="TimelineDueDate">
</FieldRef>
</ViewData>
<Query>
<Where>
<And>
<Or>
<IsNull>
<FieldRef Name="PercentComplete" />
</IsNull>
<Neq>
<FieldRef Name="PercentComplete">
</FieldRef>
<Value Type="Number">1</Value>
</Neq>
</Or>
<Lt>
<FieldRef Name="DueDate">
</FieldRef>
<Value Type="DateTime">
<Today>
</Today>
</Value>
</Lt>
</And>
</Where>
<OrderBy>
<FieldRef Name="DueDate">
</FieldRef>
<FieldRef Name="Priority">
</FieldRef>
</OrderBy>
</Query>
</View>
<View BaseViewID="3" Type="HTML" WebPartZoneID="Main" DisplayName="$Resources:core,Incomplete_Tasks;" MobileView="True" MobileDefaultView="False" Url="Upcoming.aspx" SetupPath="pages\viewpage.aspx" ImageUrl="/_layouts/15/images/issuelst.png?rev=23">
<JSLink>hierarchytaskslist.js</JSLink>
<XslLink Default="TRUE">main.xsl</XslLink>
<JSLink>clienttemplates.js</JSLink>
<RowLimit Paged="TRUE">100</RowLimit>
<Toolbar Type="Standard" />
<ViewFields>
<FieldRef Name="Checkmark">
</FieldRef>
<FieldRef Name="LinkTitle">
</FieldRef>
<FieldRef Name="DueDate">
</FieldRef>
<FieldRef Name="AssignedTo">
</FieldRef>
</ViewFields>
<ViewData>
<FieldRef Name="PercentComplete" Type="StrikeThroughPercentComplete">
</FieldRef>
<FieldRef Name="DueDate" Type="TimelineDueDate">
</FieldRef>
</ViewData>
<Query>
<Where>
<And>
<Or>
<IsNull>
<FieldRef Name="PercentComplete" />
</IsNull>
<Neq>
<FieldRef Name="PercentComplete">
</FieldRef>
<Value Type="Number">1</Value>
</Neq>
</Or>
<Geq>
<FieldRef Name="DueDate">
</FieldRef>
<Value Type="DateTime">
<Today>
</Today>
</Value>
</Geq>
</And>
</Where>
</Query>
</View>
<View BaseViewID="4" Type="HTML" WebPartZoneID="Main" DisplayName="$Resources:core,Completed_Tasks;" MobileView="True" MobileDefaultView="False" Url="completed.aspx" SetupPath="pages\viewpage.aspx" ImageUrl="/_layouts/15/images/issuelst.png?rev=23">
<JSLink>hierarchytaskslist.js</JSLink>
<XslLink Default="TRUE">main.xsl</XslLink>
<JSLink>clienttemplates.js</JSLink>
<RowLimit Paged="TRUE">100</RowLimit>
<Toolbar Type="Standard" />
<ViewFields>
<FieldRef Name="Checkmark">
</FieldRef>
<FieldRef Name="LinkTitle">
</FieldRef>
<FieldRef Name="DueDate">
</FieldRef>
<FieldRef Name="AssignedTo">
</FieldRef>
</ViewFields>
<ViewData>
<FieldRef Name="DueDate" Type="TimelineDueDate">
</FieldRef>
</ViewData>
<Query>
<Where>
<Geq>
<FieldRef Name="PercentComplete">
</FieldRef>
<Value Type="Number">1.0</Value>
</Geq>
</Where>
</Query>
</View>
<View BaseViewID="5" Type="HTML" WebPartZoneID="Main" DisplayName="$Resources:core,My_Tasks;" MobileView="True" MobileDefaultView="False" Url="MyItems.aspx" SetupPath="pages\viewpage.aspx" ImageUrl="/_layouts/15/images/issues.png?rev=23" ReqAuth="TRUE">
<JSLink>hierarchytaskslist.js</JSLink>
<XslLink Default="TRUE">main.xsl</XslLink>
<JSLink>clienttemplates.js</JSLink>
<RowLimit Paged="TRUE">100</RowLimit>
<Toolbar Type="Standard" />
<ViewFields>
<FieldRef Name="Checkmark">
</FieldRef>
<FieldRef Name="LinkTitle">
</FieldRef>
<FieldRef Name="DueDate">
</FieldRef>
<FieldRef Name="AssignedTo">
</FieldRef>
</ViewFields>
<ViewData>
<FieldRef Name="PercentComplete" Type="StrikeThroughPercentComplete">
</FieldRef>
<FieldRef Name="DueDate" Type="TimelineDueDate">
</FieldRef>
</ViewData>
<Query>
<Where>
<In>
<FieldRef Name="AssignedTo" LookupId="TRUE" />
<Values>
<Value Type="Integer">
<UserID />
</Value>
</Values>
</In>
</Where>
</Query>
</View>
<View BaseViewID="7" Type="HTML" TabularView="FALSE">
<JSLink>hierarchytaskslist.js</JSLink>
<XslLink Default="TRUE">main.xsl</XslLink>
<Toolbar Position="After" Type="Freeform">
<IfHasRights>
<RightsChoices>
<RightsGroup PermAddListItems="required" />
</RightsChoices>
<Then>
<HTML><![CDATA[<div class="tb"><img src="/_layouts/15/images/caladd.gif?rev=23" alt="" /> <a class="ms-addnew" id="idAddNewTask" href="]]></HTML>
<URL Cmd="New" />
<HTML><![CDATA[" onclick="javascript:NewItem(']]></HTML>
<ScriptQuote NotAddingQuote="TRUE">
<URL Cmd="New" />
</ScriptQuote>
<HTML><![CDATA[', true);javascript:return false;" target="_self">]]></HTML>
<HTML>Add new task</HTML>
<HTML><![CDATA[</a></div>]]></HTML>
</Then>
</IfHasRights>
</Toolbar>
<RowLimit Paged="TRUE">100</RowLimit>
<ViewFields>
<FieldRef Name="Checkmark">
</FieldRef>
<FieldRef Name="LinkTitle">
</FieldRef>
<FieldRef Name="AssignedTo">
</FieldRef>
<FieldRef Name="Status">
</FieldRef>
</ViewFields>
<Query>
<OrderBy>
<FieldRef Name="Modified" Ascending="FALSE">
</FieldRef>
</OrderBy>
</Query>
</View>
<View BaseViewID="8" Type="GANTT" WebPartZoneID="Main" DisplayName="$Resources:core,ganttChart;" Url="gantt.aspx" SetupPath="pages\viewpage.aspx" ImageUrl="/_layouts/15/images/issuelst.png?rev=23">
<XslLink Default="TRUE">main.xsl</XslLink>
<JSLink>clienttemplates.js</JSLink>
<Toolbar Type="Standard" />
<RowLimit Paged="TRUE">100</RowLimit>
<ViewFields>
<FieldRef Name="LinkTitle">
</FieldRef>
<FieldRef Name="StartDate">
</FieldRef>
<FieldRef Name="DueDate">
</FieldRef>
<FieldRef Name="PercentComplete">
</FieldRef>
<FieldRef Name="Predecessors">
</FieldRef>
<FieldRef Name="AssignedTo">
</FieldRef>
<FieldRef Name="GUID">
</FieldRef>
</ViewFields>
<ViewData>
<FieldRef Name="Title" Type="GanttTitle">
</FieldRef>
<FieldRef Name="StartDate" Type="GanttStartDate">
</FieldRef>
<FieldRef Name="DueDate" Type="GanttEndDate">
</FieldRef>
<FieldRef Name="PercentComplete" Type="GanttPercentComplete">
</FieldRef>
<FieldRef Name="Predecessors" Type="GanttPredecessors">
</FieldRef>
<FieldRef Name="ParentID" Type="HierarchyParentID">
</FieldRef>
<FieldRef Name="DueDate" Type="TimelineDueDate">
</FieldRef>
</ViewData>
<Query />
</View>
<View BaseViewID="9" Type="CALENDAR" WebPartZoneID="Main" DisplayName="$Resources:core,userinfo_schema_calendarview;" MobileView="FALSE" MobileDefaultView="FALSE" SetupPath="pages\viewpage.aspx" ImageUrl="/_layouts/15/images/events.png?rev=23" TabularView="FALSE" Url="calendar.aspx" MobileUrl="_layouts/15/mobile/viewdaily.aspx">
<Toolbar Type="Standard" />
<ViewHeader>
</ViewHeader>
<ViewBody>
</ViewBody>
<ViewFooter>
</ViewFooter>
<ViewEmpty>
</ViewEmpty>
<ParameterBindings>
<ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" />
<ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_DEFAULT)" />
</ParameterBindings>
<ViewFields>
<FieldRef Name="StartDate">
</FieldRef>
<FieldRef Name="DueDate">
</FieldRef>
<FieldRef Name="Title">
</FieldRef>
</ViewFields>
<ViewData>
<FieldRef Name="Title" Type="CalendarMonthTitle">
</FieldRef>
<FieldRef Name="Title" Type="CalendarWeekTitle">
</FieldRef>
<FieldRef Name="Location" Type="CalendarWeekLocation">
</FieldRef>
<FieldRef Name="Title" Type="CalendarDayTitle">
</FieldRef>
<FieldRef Name="Location" Type="CalendarDayLocation">
</FieldRef>
</ViewData>
<Query>
<Where>
<DateRangesOverlap>
<FieldRef Name="StartDate">
</FieldRef>
<FieldRef Name="DueDate">
</FieldRef>
<Value Type="DateTime">
<Month>
</Month>
</Value>
</DateRangesOverlap>
</Where>
</Query>
</View>
<View BaseViewID="10" Name="eb633ca3-52e7-4296-8b77-3997d05dcbe7" DisplayName="ExtraView" Type="HTML" WebPartZoneID="Main" SetupPath="pages\viewpage.aspx" Url="ExtraView.aspx">
<ViewFields>
<FieldRef Name="LinkTitle" />
<FieldRef Name="LinkTitleNoMenu" />
<FieldRef Name="Title" />
<FieldRef Name="Status" />
<FieldRef Name="StartDate" />
</ViewFields>
<Query />
<Toolbar Type="Standard" />
<XslLink Default="TRUE">main.xsl</XslLink>
</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>
[Edit] Apparently its not possible to add new Views with a new BaseViewId to a list with only a custom schema. But why is this not possible? Is it only possible when creating a list definition?