Make Title field enforce unique values in custom list definition (SharePoint 2010)

I have a custom list definition, and I am trying to rename the custom 'Title' field to 'Name' and to make it enforce unique values. First, I referenced it in the custom content type (Elements.xml):

<FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}"  Name="Title"/>

and then in the list template (Schema.xml):

<Field ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" DisplayName="Name" Type="Text" AllowDuplicateValues="FALSE" Required="TRUE"></Field>

The field is renamed, but I can add list items with the same title. If I go in the field settings page, the Enforce unique values property is set to false. How can I enable it, what I am doing wrong?

5
задан kjv 15 May 2011 в 17:49
поделиться