I want to add additional fields to the Discussion list and I want to provision it through feature. To do so, I copied the Schema.xml file from SharePoint's Discussion List's Schema file from 15 hive.
My Schama file contains following code:
<List xmlns:ows="Microsoft SharePoint" Name="Discussions" Title="Discussions" Direction="$Resources:Direction;" Url="Lists/Discussions" BaseType="0" EnableContentTypes="TRUE" FolderCreation="FALSE" DisableGridEditing="TRUE">
<MetaData>
<ContentTypes>
<ContentTypeRef ID="0x012002">
<Folder TargetName="Discussion" />
</ContentTypeRef>
<ContentTypeRef ID="0x0107">
<Folder TargetName="Message" />
</ContentTypeRef>
</ContentTypes>
<Fields>
<Field ID="{E72347A3-6CCE-4FFB-8BD5-BD2B7DDBF855}" Name="test1" StaticName="test1" DisplayName="Referance" Type="User" Required="FALSE" Mult="TRUE" Group="Sample Fields">
</Field>
<Field ID="{2649184E-DDF5-47FD-8C83-899A8C880BCE}"
Name="test2"
StaticName="test2"
DisplayName="Start Date"
Type="DateTime"
Format="DateOnly"
Required="TRUE"
Group="Sample Fields">
</Field>
After creating the list from the template I can see the fields in the List Settings but they are not appearing in new form. If I remove the <ContentTypes> node then the fields added are appearing in the new form but after adding discussion, in the view the Title field is not clickable.
What should I do to add the custom fields in discussion list?

0 commentaires:
Enregistrer un commentaire