Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 291647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:06:29+00:00 2026-05-12T06:06:29+00:00

Trying to use features to deploy custom fields, content type and list. So far

  • 0

Trying to use features to deploy custom fields, content type and list. So far I have a content type referencing custom and builtin fields. Content type inherits Item (0x01).

Now, I create custom list definition that references content type and fields (builtin and custom ones). I explicitly set ShowInDisplayForm, ShowInEditForm, ShowInNewForm values to true, however when I deploy feature and create list based on definition, all I get is only a single Title field in all forms!

However if I add field from UI to the list, it shows up in the form! Furthermore, if I create custom list from UI and add the content type, those fields are showing up in forms!

What’s up with that?

By the way, I use VSeWSS tool for Visual Studio so it already genrates alot of stuff correctly.

Some code:

<ContentTypes>
  <ContentTypeRef ID="0x01003420C661289843dbAB9E41F43C23BFD0" />
</ContentTypes>
<Fields>
  <Field ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" Group="$Resources:core,Extended_Columns" Required="TRUE" ShowInDisplayForm="TRUE" ShowInEditForm="TRUE" ShowInNewForm="TRUE" Type="Text" Sortable="TRUE" Filterable="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" />
  <Field ID="{B4629012-C672-4911-B0D0-B9CB2DA44ED2}" DisplayName="Jautājumu pacēla" Group="$Resources:core,Extended_Columns" Name="QuestionRisedBy" Required="TRUE" ShowInDisplayForm="TRUE" ShowInEditForm="TRUE" ShowInNewForm="TRUE" Type="User" Sortable="TRUE" Filterable="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" />
  <Field ID="{6DF9BD52-550E-4a30-BC31-A4366832A87F}" DisplayName="Komentārs" Group="$Resources:core,Extended_Columns" Name="Comment" AppendOnly="TRUE" Required="FALSE" NumLines="12" Type="Note" ShowInDisplayForm="TRUE" ShowInEditForm="TRUE" ShowInNewForm="TRUE" Sortable="FALSE" Filterable="FALSE" SourceID="http://schemas.microsoft.com/sharepoint/v3" />
  <Field ID="{FC072586-E8BB-444f-AAA4-8D5745FBC096}" DisplayName="ParentItemId" Group="$Resources:core,Extended_Columns" Name="AgendaParentItemId" Required="TRUE" Type="Integer" Sortable="FALSE" Filterable="FALSE" SourceID="http://schemas.microsoft.com/sharepoint/v3" />
  <Field ID="{29207E42-E107-4379-B620-BAAFC461276B}" DisplayName="AgendaRootItemId" Group="$Resources:core,Extended_Columns" Name="AgendaRootItemId" Required="TRUE" Type="Integer" Sortable="FALSE" Filterable="FALSE" SourceID="http://schemas.microsoft.com/sharepoint/v3" />
  <Field ID="{06063FDB-3C2A-4141-91F7-28C2739CE6B5}" DisplayName="AgendaItemClosed" Group="$Resources:core,Extended_Columns" Name="AgendaItemClosed" Required="FALSE" Type="Boolean" Sortable="TRUE" Filterable="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" />
</Fields>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T06:06:29+00:00Added an answer on May 12, 2026 at 6:06 am

    Yes, ContentType has FieldRefs for all the fields (Well, not inherited ones). However I read that when defining contet types in schema.xml, you must explicitly define Field`s also (that’s weird), however if you add ContentType programmatically, then it correctly adds CType fields to definition.

    By the way, what you see is what VSeWSS (microsoft extension for VS) tool generated (all the references).

    Quite from SharePoint blog:

    What you need to do is to add the
    exact same elements to the
    element as in the content
    type, including the same ID. This is a
    little strange, but in fact you need
    to define the fields twice, both in
    the content type and in the schema.xml
    to make this work. You can skip the
    Group and a few other properties.

    However if I won’t use Fields, I`ll get an exception:

    [COMException (0x80004005): Nevar pabeigt šo darbību.
    
    Lūdzu, mēģiniet vēlreiz.]
       Microsoft.SharePoint.Library.SPRequestInternalClass.GetViewsSchemaXml(String bstrUrl, String bstrListName, Boolean bFullBlown, ISP2DSafeArrayWriter p2DWriter, Int32& plDefaultViewIndex) +0
       Microsoft.SharePoint.Library.SPRequest.GetViewsSchemaXml(String bstrUrl, String bstrListName, Boolean bFullBlown, ISP2DSafeArrayWriter p2DWriter, Int32& plDefaultViewIndex) +122
    

    Oh, well, anyway, I read somwhere an article (can’t find that article no more)that suggest adding content type with feature receivers, then it properly shows up fields in forms.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 173k
  • Answers 173k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can use the Static Maps API. It generates a… May 12, 2026 at 2:37 pm
  • Editorial Team
    Editorial Team added an answer This is a known bug. Just wait for it to… May 12, 2026 at 2:37 pm
  • Editorial Team
    Editorial Team added an answer Yes, shared data access must be protected even if you… May 12, 2026 at 2:37 pm

Related Questions

First, let me use one sentence to let out some frustration: My god, developing
I have spent most of my web-development career in the Microsoft camp, but for
I'm somewhat of a Rails newbie. I'm writing a couchrest-rails app, so am not
I am trying to create a subclass of WebPart that will act as a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.