One site collection SharePoint list to another site collection.

Hi Friends,

I have a SharePoint 2013 site. In the site I have a list called "Orders". If I create a new SharePoint site collection I need "Orders" list.

How can we achieve this.Any one help me on this.

Whether we can use site definition or event receivers? Please help me on this.

Thanks,

Tiru

May 25th, 2015 7:15am

Hi,

you have to options:

  • Go to list settings and save list as template. Download the template and import it on the new site collection.
  • Use PowerShell to Export and import list.

Hope this helps

Free Windows Admin Tool Kit Click here and download it now
May 25th, 2015 7:42am

Hi Rober,

Thanks for your answer. We can do this using save list as template.

But we don't want to use OOB feature here. Just whenever if I create new site collection in my web application I need to show that list in my current site collection.

If you have any other idea please let me know.

Thanks,

Tiru

May 25th, 2015 7:56am

Hi,

then you need to develop custom solution. You can go with Feature stapling when you create new Site collection that a feature gets activated and creates a list.

Or you can create a custom web template, where this list is included as a list instance.

Free Windows Admin Tool Kit Click here and download it now
May 25th, 2015 8:01am

Hi Tirupal,

Please find the working code of a webadded event receiver.

 public override void WebProvisioned(SPWebEventProperties properties)
        {
            //base.WebProvisioned(properties);
            SPWeb web = properties.Web;
            string ListTitle = "Orders";
            string ListDescription = "This is our description for our order list";
            Guid ListId = web.Lists.Add(ListTitle, ListDescription,SPListTemplateType.GenericList); //We are using Custom list template for our list.
            SPList list = web.Lists[ListId];
            list.OnQuickLaunch = true; // This is to show the list in the quick launch bar.
            list.Update();

        }
May 26th, 2015 3:24am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics