Note that there are some explanatory texts on larger screens.

plurals
  1. POSharepoint 2010 list schema deployment
    primarykey
    data
    text
    <p>I have create a list schema definition and list instance in VS2010. I have a feature that deploys both list definition and instance, plus a feature stappler which actives the new feature for each new sub site.</p> <p>My list definition schema.xml is:</p> <pre><code> &lt;Fields&gt; &lt;Field Name="StartDate" Type="DateTime" Required="FALSE" DisplayName="Start Date" StaticName="StartDate" ID="9ea1256f-6b67-43b0-8ab7-1d643bf8a834" SourceID="http://schemas.microsoft.com/sharepoint/v3" ColName="datetime1" RowOrdinal="0" /&gt; &lt;Field Name="EndDate" Type="DateTime" Required="FALSE" DisplayName="End Date" StaticName="EndDate" ID="900503fa-4ab1-4938-be75-b40694ab97b6" SourceID="http://schemas.microsoft.com/sharepoint/v3" ColName="datetime2" RowOrdinal="0" /&gt; </code></pre> <p>I deploy successfully and create a new site using my site definitions, list gets created successfully all things work.</p> <p>Now i want to add another field to my list, i go back to visual studio 2010 edit list definition schema.xml and add another field in Metadata fields section.</p> <p>The schema.xml is now:</p> <pre><code> &lt;Fields&gt; &lt;Field Name="StartDate" Type="DateTime" Required="FALSE" DisplayName="Start Date" StaticName="StartDate" ID="9ea1256f-6b67-43b0-8ab7-1d643bf8a834" SourceID="http://schemas.microsoft.com/sharepoint/v3" ColName="datetime1" RowOrdinal="0" /&gt; &lt;Field Name="EndDate" Type="DateTime" Required="FALSE" DisplayName="End Date" StaticName="EndDate" ID="900503fa-4ab1-4938-be75-b40694ab97b6" SourceID="http://schemas.microsoft.com/sharepoint/v3" ColName="datetime2" RowOrdinal="0" /&gt; &lt;!-- New Field --&gt; &lt;Field Name="TestRedeploy" Type="Text" Required="FALSE" DisplayName="TestRedeploy" StaticName="TestRedeploy" RichText="True" Sortable="FALSE" ID="A5656659-CD3E-4C84-AEAC-554DCE25434B" SourceID="http://schemas.microsoft.com/sharepoint/v3" ColName="ntext3" RowOrdinal="0" /&gt; &lt;/Fields&gt; </code></pre> <p>I build and deploy successfully, but when i go in list settings to check if new column was added i find that all columns have been deleted. Can you help me figure out how to deploy new columns with schema.xml ?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload