About



Erik Burger is a .NET Consultant at Antares Informatisering, an outsourcing company based in The Netherlands. He refuses to specialise in a single programming language as a matter of principle, believing that being multi-disciplinary makes him a better developer. He's a strong advocate of Pragmatic Programming and a newbie enthusiast in Ruby and Rails.

View Erik Burger's profile on LinkedIn


Microsoft Windows SharePoint Services 3.0: Application Development


Disclaimer



All opinions expressed in this blog are solely those of the author and not necessarily those of Antares. You may use all the information provided here but please understand that it is provided "AS IS" and comes with no warranty of any kind.


213


For an internal project we were creating a number of custom List Definitions by editing the schema.xml files. When we opened an instance of the List Definition in SharePoint, the fields we had added did not show up in the View, New and Edit forms. Only the Title field was visible.

As it turned out, the schema.xml file contained the following xml:

<List xmlns:ows="Microsoft SharePoint" ... >
  <MetaData>
   <ContentTypes>
      <ContentTypeRef ID="0x01">
        <Folder TargetName="Item" />
      </ContentTypeRef>
      <ContentTypeRef ID="0x0120" />
    </ContentTypes>
  ...

According to Microsoft, the ContentTypeRef element “specifies a reference to a content type to associate with lists that are created through the list definition”. In this case the Content Types are Item and Folder. For a list of the default Content Types included in Windows SharePoint Services 3.0, and their content type IDs, see here. For some more information on Content Types, see the Introduction to Content Types in the MSDN Library.

Obviously (in retrospect) the Item and Folder Content Types do not contain our custom Fields, only the Title Field. Removing the ContentTypes element altogether solved the problem and made all Fields visible in the View, New and Edit forms.

Hope this helps.


0 Responses to “Fields not Showing in Custom List Definition”

  1. No Comments

Leave a Reply