0

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!

1 Answer 1

0

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" />

0

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.