title: Sharepoint 2010 - Adding Sample data to User Field type
body: <p>Hi StackOverflow members!</p>
  
  <p>I have developing custom list in Visual Studio (trough XML). I created list definition (with content type) and added list instance to it.</p>
  
  <p>Here is schema.xml of my list:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;List xmlns:ows="Microsoft SharePoint" Title="Teams" EnableContentTypes="TRUE"  FolderCreation="FALSE" Direction="$Resources:Direction;" Url="Lists/Teams" BaseType="0" xmlns="http://schemas.microsoft.com/sharepoint/"&gt;
   &lt;MetaData&gt;
  &lt;ContentTypes&gt;
    &lt;ContentTypeRef ID="0x010089E3E6DB8C9B4B3FBB980447E313DE94" /&gt;
  &lt;/ContentTypes&gt;
  &lt;Fields&gt;
    &lt;Field Type="User" Name="Employee" DisplayName="Employee" Required="TRUE" ID="{7B18E941-BAAD-453A-895C-39579AB5A9F1}"  Group="Sample Group" /&gt;
    &lt;Field Type="Boolean" Name="Manager" DisplayName="Manager" ID="{9FC927CC-45EB-4E9E-8F25-18AAEDF7DCAF}"  Group="Sample Group" /&gt;
  &lt;/Fields&gt;
  &lt;Views&gt;
    &lt;View BaseViewID="0" Type="HTML" MobileView="TRUE" TabularView="FALSE"&gt;
      &lt;Toolbar Type="Standard" /&gt;
      &lt;XslLink Default="TRUE"&gt;main.xsl&lt;/XslLink&gt;
      &lt;RowLimit Paged="TRUE"&gt;30&lt;/RowLimit&gt;
      &lt;ViewFields&gt;      
        &lt;FieldRef  Name="Employee" /&gt;
        &lt;FieldRef  Name="Manager" /&gt;
      &lt;/ViewFields&gt;
      &lt;Query&gt;
        &lt;OrderBy&gt;
          &lt;FieldRef Name="Modified" Ascending="FALSE"&gt;&lt;/FieldRef&gt;
        &lt;/OrderBy&gt;
      &lt;/Query&gt;
      &lt;ParameterBindings&gt;
        &lt;ParameterBinding Name="AddNewAnnouncement" Location="Resource(wss,addnewitem)" /&gt;
        &lt;ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" /&gt;
        &lt;ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_ONET_HOME)" /&gt;
      &lt;/ParameterBindings&gt;
    &lt;/View&gt;
    &lt;View BaseViewID="1" Type="HTML" WebPartZoneID="Main" DisplayName="$Resources:core,objectiv_schema_mwsidcamlidC24;" DefaultView="TRUE" MobileView="TRUE" MobileDefaultView="TRUE" SetupPath="pages\viewpage.aspx" ImageUrl="/_layouts/images/generic.png" Url="AllItems.aspx"&gt;
      &lt;Toolbar Type="Standard" /&gt;
      &lt;XslLink Default="TRUE"&gt;main.xsl&lt;/XslLink&gt;
      &lt;RowLimit Paged="TRUE"&gt;30&lt;/RowLimit&gt;
      &lt;ViewFields&gt;
        &lt;FieldRef Name="LinkTitle"&gt;&lt;/FieldRef&gt;     
        &lt;FieldRef  Name="Employee" /&gt;
        &lt;FieldRef  Name="Manager" /&gt;
      &lt;/ViewFields&gt;
      &lt;Query&gt;
        &lt;OrderBy&gt;
          &lt;FieldRef Name="ID"&gt;&lt;/FieldRef&gt;
        &lt;/OrderBy&gt;
      &lt;/Query&gt;
      &lt;ParameterBindings&gt;
        &lt;ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" /&gt;
        &lt;ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_DEFAULT)" /&gt;
      &lt;/ParameterBindings&gt;
    &lt;/View&gt;
  &lt;/Views&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;
  </code></pre>
  
  <p>
  </p>
  
  <p>and elements.xml with list template and content type:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Elements xmlns="http://schemas.microsoft.com/sharepoint/"&gt;
  &lt;!-- Do not change the value of the Name attribute below. If it does not match the folder name of the List Definition project item, an error will occur when the project is run. --&gt;
  &lt;ListTemplate
      Name="TeamList"
      Type="10000"
      BaseType="0"
      OnQuickLaunch="TRUE"
      SecurityBits="11"
      Sequence="410"
      DisplayName="TeamList"
      Description="My List Definition"
      Image="/_layouts/images/itgen.png"&gt;
  
  &lt;/ListTemplate&gt;
  &lt;ContentType
      ID="0x010089E3E6DB8C9B4B3FBB980447E313DE94"
      Name="Team Member"
      Group="Sample Group"
      Description=""
      Version="0"&gt;
      &lt;FieldRefs&gt;
        &lt;FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" Hidden="TRUE" /&gt;
        &lt;FieldRef ID="{7B18E941-BAAD-453A-895C-39579AB5A9F1}" /&gt;
        &lt;FieldRef ID="{9FC927CC-45EB-4E9E-8F25-18AAEDF7DCAF}" /&gt;
      &lt;/FieldRefs&gt;
  &lt;/ContentType&gt;
  
  &lt;Field Type="User" Name="Employee" DisplayName="Employee" Required="TRUE" ID="{7B18E941-BAAD-453A-895C-39579AB5A9F1}"  Group="Sample Group" /&gt;
  &lt;Field Type="Boolean" Name="Manager" DisplayName="Manager" ID="{9FC927CC-45EB-4E9E-8F25-18AAEDF7DCAF}"  Group="Sample Group" /&gt;
  
  &lt;/Elements&gt;
  </code></pre>
  
  <p><Strong>The question is: how to add sample data to this list?</Strong> Especially to field of type "User"?</p>
  
  <p>I tried to add this code in list instance element like this:</p>
  
  <pre><code>&lt;ListInstance Title="TeamList"
              OnQuickLaunch="TRUE"
              TemplateType="10000"
              Url="Lists/TeamList"
              Description="TeamList"&gt;
    &lt;Data&gt;
        &lt;Rows&gt;
            &lt;Row&gt;
                &lt;Field Name="Employee"&gt;CONTOSO\joses&lt;/Field&gt;
                &lt;Field Name="Manager"&gt;true&lt;/Field&gt;
            &lt;/Row&gt;
        &lt;/Rows&gt;
    &lt;/Data&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>but, error occures:</strong> Error occurred in deployment step 'Activate Features': At least one field type in not installed properly. Any help for makeing it work with dialog would be very appreciated.</p>