The Solution is very easy. You must break the Inherits from item and add RemoveFieldRef to your content type definition :-).
Hier is a code example which can you use as an example for you:
<
pre
class
=
"brush: xml"
>// Comment
<Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <!-- Parent ContentType: Item (0x01) --> <ContentType ID="0x01006ffb64509c2341d2bff13b98859f792b" Name="MyTestCT" Description="My Content Type" Inherits="FALSE" Version="0"> <FieldRefs> <RemoveFieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" /> <FieldRef ID="{38B8C4D9-6048-44A3-A092-BB11DD7F6861}" Name="MyNewfield" Required="TRUE"></FieldRef> </FieldRefs> </ContentType> <Field ID="{38B8C4D9-6048-44A3-A092-BB11DD7F6861}" Name="MyNewfield" Group="My Cloumns" DisplayName="My New Field" Description="My New Field" Type="Text" Required="TRUE"/> </Elements>
</pre>
Keine Kommentare:
Kommentar veröffentlichen