I have defined my list definition as following:
<List xmlns:ows="Microsoft SharePoint" Title="Requests List Definition" FolderCreation="FALSE" Direction="$Resources:Direction;" Url="Lists/RequestsListDefinition" <MetaData>
<ContentTypes>
<ContentType ID="0x010078bed2b1dce44a12a759eeca0717f323"
Name="Request"
Group="BrmpTool Content Types"
Description="BrmpTool Request Type"
Inherits="TRUE"
Version="0">
<FieldRefs>
<!-- Requirement high level description -->
<FieldRef ID="2a7a1ab2-3085-4141-8fbd-75e5ee439c2a" />
<!-- Rough Estimation – Internal IT Technical -->
<FieldRef ID="26722be1-ed56-4619-80f1-1c8c5d9bde02" />
And the fields are defined lower in the same List definitions
<List itle="Requests List Definition" Url="Lists/RequestsListDefinition">
<MetaData>
<ContentTypes> Declared above </ContentTypes>
<Fields>
<!-- Request columns-->
<Field Name="RequirementHighLevelDescription" Type="Note" Required="TRUE" DisplayName="Requirement high level description" StaticName="RequirementHighLevelDescription" NumLines="10" RichText="FALSE" Sortable="FALSE" ID="2a7a1ab2-3085-4141-8fbd-75e5ee439c2a" SourceID="http://schemas.microsoft.com/sharepoint/v3" DisplaySize="" Description="Requirement high level description" />
<Field Name="RoughEstimationInternalITTechnic" Type="Number" Required="FALSE" DisplayName="Rough Estimation – Internal IT Technical" StaticName="RoughEstimationInternalITTechnic" Decimals="0" ID="26722be1-ed56-4619-80f1-1c8c5d9bde02" SourceID="http://schemas.microsoft.com/sharepoint/v3" Description="Rough Estimation – Internal IT Technical" />
Should i put the actual field definitions in a separate Element.xml file and only reference them in the content type thus removing field definitions from List->Fields ?
The main idea is that i want my list to use content types.
If I place the Field definitions in a separate Elements.xml and deploy it, will these fields get created as Site Columns?
My list is the only one who's gonna be using this content type.
Thanks!
Update:
Please see this taken from msdn
It would seem that I defined it correctly, although as per image I'm guessing i should add a third declaration at Site level (probably in a second Elements.xml).
Well I haven't done that in my example, so what does that mean (coz it works? wore the fields automatically added as Site Columns ?