title: Sharepoint ListTemplate Multiple Content Types - Ref Fields
body: <p>I am trying to create a list template in SharePoint Feature using CAML. I have <strong>two content types</strong> <strong>"News</strong>" and <strong>"News Release"</strong> they both share two fields called <strong>Overview</strong> and <strong>Description</strong>.</p>
  
  <p>I have been reading that the "listtemplate" caml element does not automatically add the fields from the content types, you need to specify all the fields. When fields are specified SharePoint does not update the "Used In" in the sharepoint list settings (<a href="http://img385.imageshack.us/img385/8995/listsettings.jpg" rel="nofollow noreferrer">screenshot</a>). <strong>This is a problem as Views can't be updated with these fields.</strong></p>
  
  <p>Could this be fixed with a feature receiver written in c#?</p>
  
  <p>Any ideas?</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;Elements xmlns="http://schemas.microsoft.com/sharepoint/"&gt;
    &lt;ListTemplate Name="News"
                  DisplayName="News"
                  Description="News"
                  Type="100"
                  BaseType="0"
                  OnQuickLaunch="true"
                  SecurityBits="11"
                  Sequence="410"
                  Image="/_layouts/images/itgen.gif"
                  Unique="True"
                  DisableAttachments="True" /&gt;
  &lt;/Elements&gt;
  
  &lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;List Name="News"
        Title="News"
        FolderCreation="FALSE"
        Direction="$Resources:Direction;"
        Url="Lists/News"
        EnableContentTypes="True"
        BaseType="0" 
        Type="100"
        xmlns="http://schemas.microsoft.com/sharepoint/"
        xmlns:ows="Microsoft SharePoint"&gt;
    &lt;MetaData&gt;
      &lt;ContentTypes&gt;
        &lt;ContentTypeRef ID="0x010007196C9EB6E5B04BAE108FD1969FD42B01" /&gt;
        &lt;ContentTypeRef ID="0x010007196C9EB6E5B04BAE108FD1969FD42B02" /&gt;
      &lt;/ContentTypes&gt;
      &lt;Fields&gt;
        &lt;Field ID="{1E061768-0380-48e4-8E71-86CAE6DDDF30}" Type="Note" DisplayName="Overview" Name="Overviews" /&gt;
        &lt;Field ID="{9406510E-511A-438f-AD9F-A55CED16B033}" Type="Note" DisplayName="Description" StaticName="Description" Name="Description" /&gt;
      &lt;/Fields&gt;
      &lt;View&gt;
        Removed For Post
      &lt;/View&gt;          
      &lt;Forms&gt;
        &lt;Form Type="DisplayForm" Url="DispForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" /&gt;
        &lt;Form Type="EditForm" Url="EditForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" /&gt;
        &lt;Form Type="NewForm" Url="NewForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" /&gt;
      &lt;/Forms&gt;
    &lt;/MetaData&gt;
  &lt;/List&gt;
  </code></pre>