English 中文(简体)
Automate creation of a SharePoint list without writing any code
原标题:

As part of the configuration of my product (after installation), I need to create a few Sharepoint lists on the SharePoint site specified by the user.

Digging around, it seems that i need to write custom code to do this, either using the server-side API as described at http://sarangasl.blogspot.com/2009/11/create-sharepoint-list-programmatically.html, or using the SharePoint List web services. But in both cases, I need to write code to do this.

Is there any out-of-box way to do this, without writing any code? My ideal solution would be to create an XML file which has the appropriate definition, and then run something (passing in the SharePoint site url), which would then create the list, and return a status code indicating success or failure. Is such an ideal solution possible?

If not, what is the best/easiest solution to do this? One of the two above, or something else?

问题回答

Create a feature specifying a ListInstance, when you activate the feature, the list will be created: http://msdn.microsoft.com/en-us/library/ms476062.aspx

I d go with the feature as Vladi said.

But you can also install the STSADM extensions from Gary Lapointe. It includes a command to create a list. You can then write a batch file that creates all the lists in 1 go.





相关问题
SharePoint - Approaching Website Storage Limit Email

How can i go about changing the distribution list as well as the email text for the email that goes out to site collection admin when a site collection approaches it s size limit? Thanks for your ...

UI automated testing within SharePoint

I m looking for automated Functional Testing tools that can manipulate SharePoint sites, libraries, and documents thought the web interface. It needs to be extensible enough to handle any custom ...

Enable authorization on sitemap provider

I want to enable Authorization on the Site map provider. We have enabled anonymous access to the site and we want the Site map provider to be visible only to authorized users. I tried ...

SharePoint : web service permission error

I have a sharepoint site, and I am calling a standard sharepoint web service. I create the web service request like this : wsDws.Url = this.SiteAddress + @"/_vti_bin/Dws.asmx"; When I use ...

Sharepoint 2007 Data view Webpart custom parameters

I m sort of new to the custom parameters that can be setup on a DataView Webpart. There are 6 options: - None - Control - Cookie - Form - QueryString - Server Variable I think that None, Cookie and ...

热门标签