Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I've created a ListTemplate based off of a custom content type in Visual Studio for a document library. The content type adds two fields, a fiscal year and a fiscal month. It adds it to the template fine and the user is prompted correctly after uploading a doc for those fields, but the default view that is used when a new list is created from this list template does not include those fields. Is it possible to get those fields added to the default view? Thanks!

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

If you follow the MSDN article How to: Create a Custom List Definition in the part "Create the List Definition from the Content Type" step 5 and 6 describes how to add fields to the view:

Step 5. Next, open the Schema.xml file that was created.
Step 6. In the ViewFields element, add the same FieldRef element that you added to the content type. The following XML adds a reference to the field.
<FieldRef ID="FieldId" Name="FavoriteColor" />

share|improve this answer
    
Ah, I completely missed that. Thanks! –  Arthurdent510 Jun 12 '12 at 15:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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