I know how to create lists with Visual Studio.

I need hint on how to create the custom list named 'test' with Title, URL and an boolean field only on the RootWebs of every site collection the feature is deployed and activated on.


Add the RootWebOnly="true" property to your custom list. The Feature with the Custom List must be scoped to Site.

<ListInstance Title="My custom list"
            Description="Simple custom list sample."
            RootWebOnly="true" />
  • Should I scope this feature to web or site collection level?
    – variable
    Apr 8 '14 at 6:40
  • By default I can see that it is scoped at web level. Why site ? can you tell me.
    – variable
    Apr 8 '14 at 6:41
  • Here's a link that explains the different scopes: sharepoint.stackexchange.com/questions/27436/… Apr 8 '14 at 6:43
  • Can you also tell me whether the above code needs (ROOTWEBONLY) to go in the elements.xml file of the list or the list instance?
    – variable
    Apr 8 '14 at 6:45
  • 1
    I guess then it will no longer be customizable. Anyways I did the change on the listnameinstance->elements.xml and it worked.
    – variable
    Apr 8 '14 at 7:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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