I have a custom content type based on document content type, and I added some columns to this content type.

I referenced this content type from list definition like this:

      <ContentTypeRef ID="0x010100E78B02337C812A4692E59BF81668901202">

Now when I create a list instance from this list definition, and click: new, I can't see my content type in the dropdown, I can only see New Document, I have to go to list settings and enable content types on the list, then I will see my content type in the dropdown, now if I upload any document to the library, it will not show me any columns for my content types, it will not show me the dropdown to choose my content type.

If I add this content type to other library, it will work fine, when uploading a document to the library I can choose from the properties the custom columns.

What's wrong with my process?

1 Answer 1

  1. You need enable contenttype in your list def (use EnableContentTypes attribute of the List element)
  2. You need copy the field def XML section to your list def, just ref the contenttype will NOT working.

i have googled a link for you: http://blogs.msdn.com/b/mcsnoiwb/archive/2008/12/01/creating-list-definitions-with-content-types.aspx

  • so I have to copy the field xml to the fieldref inside the contenttyperef, or inside the list definition itself? Sep 23, 2013 at 15:13
  • inside the list def, not the contenttyperef
    – Eric
    Sep 25, 2013 at 9:52
  • but why do I have to define it again? isn't the contenttyperef references the fields already? Sep 25, 2013 at 13:32
  • okay... this is really 'repetitive', but you have to. tell you some thing MS always say: BY DESIGN
    – Eric
    Sep 26, 2013 at 1:50
  • yes seems like that! Sep 26, 2013 at 9:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.