0

I created a Visual Studio SharePoint project that has a custom list in it. When I deployed the solution, the list instance is created for only the root site and not for subsites. The feature scope is "Site". Is there is a way to create list instance for all the sites and subsites in a site collection using this approach? I understand that this can be done by custom code, but I want to check if its possible by using default options.

  • I don't think default option exists, list instance is a single instance and can be created in only one site either root or a subsite. If you need custom code, let me know – Arsalan Adam Khatri May 14 '15 at 5:48
  • @ArsalanAdamKhatri Thanks for the response Arsalan. I created a console application for this requirement. Can you post it as answer so that i can mark it as correct. – Thomas Mathew May 14 '15 at 5:56
  • 2
    Let's wait for others to jump in and see, maybe I will learn something NEW too :) – Arsalan Adam Khatri May 14 '15 at 8:22
2

The list instance was created on the site on which you activated the feature.

Your list should be in a web-scoped feature. Site-scoped features are for site scoped things like master pages, content types and web parts. They will not cause web-scoped things like lists to become automatically provisioned on subwebs. This means every subsite you want the list to appear on needs to have the feature activated.

0

If the Scope is "Site" it creates only at root site level, change it to "Web" and deploy it.

Please deactivate, uninstall and retract completely before you deploy your changes.

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.