I have a content type that references a built-in site column like this:
<Elements ...>
<ContentType ...>
<FieldRefs>
<!-- a reference to the built-in field called "Email2" -->
<FieldRef ID="{e232d6c8-9f49-4be2-bb28-b90570bcf167}"
Name="EmailUrgent"
DisplayName="Urgent Email"/>
<!-- other fields -->
</FieldRefs>
</ContentType>
</Elements>
This content type will deploy just fine. In visual studio, I created a list template and instance from this content type. Here is the first part of the Schema.xml
:
<?xml version="1.0" encoding="utf-8"?>
<List xmlns:ows="Microsoft SharePoint" Title="Station List" FolderCreation="FALSE" Direction="$Resources:Direction;" Url="Lists/MyContentTypeName" BaseType="0" xmlns="http://schemas.microsoft.com/sharepoint/">
<MetaData>
<ContentTypes>
<ContentType ID="0x01009e5b439643e048d6a83e8431f4322f0500e0e09a4c1ccb443f97a9dc228fe0b9f8" Name="MyContentTypeName" Group="MyGroup" Description="" Inherits="TRUE" Version="0">
<FieldRefs>
<!-- other fieldrefs -->
<FieldRef ID="{e232d6c8-9f49-4be2-bb28-b90570bcf167}" Name="EmailUrgent" DisplayName="Urgent Email" />
</FieldRefs>
</ContentType>
</ContentTypes>
<Fields>
<Field ID="{E232D6C8-9F49-4be2-BB28-B90570BCF167}" Name="Email2" StaticName="Email2" SourceID="http://schemas.microsoft.com/sharepoint/v3" DisplayName="$Resources:core,E-mail_2_OL;" Group="$Resources:core,Person_Event_Columns;" Type="Text" Sealed="TRUE" AllowDeletion="TRUE" />
<!-- other fields -->
</Fields>
<Views>
<!-- blah blah -->
</Views>
<Forms>
<!-- blah blah -->
</Forms>
</MetaData>
</List>
And finally, the list instance xml:
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<ListInstance Title="MyContentType"
OnQuickLaunch="TRUE"
TemplateType="10001"
Url="Lists/MyContentTypeName"
Description="My List Instance">
<Data>
<Rows>
<Row>
<Field Name="EmailUrgent">[email protected]</Field>
<!-- other fields -->
</Row>
</Rows>
</Data>
</ListInstance>
</Elements>
It's the list instance that causes a problem, ending ultimately in an error like this:
Error occurred in deployment step 'Activate Features': Column 'EmailUrgent' does not exist. It may have been deleted by another user.
The only thing I see that seems questionable is that I try to change the internal names of the fields in the content type definition. Is that where I'm going wrong, or is it somewhere else?