views:

1141

answers:

2

I'm creating Document Libraries in SharePoint with the Webservice Lists.AddList method through a C#.Net application. (See below)

listsService.AddList(listTitle, listDescription, 101);

I would like them to show up in the Quick Launch menu under the site they're created in rather than just the 'All Site Content' menu.

I've had a look at the Lists.UpdateList() Method, but without much luck.

Does anyone know how to do this through Web Services? (It cannot be done manually as there are far too many lists to change).

I'm using the latest version of SharePoint Server and Web Services.

Thankyou :)

+2  A: 

I believe you are correct that setting OnQuickLaunch isn't available through the web service. Setting OnQuickLaunch in listProperties for UpdateList is what I would try, but it sounds like that doesn't work.

If your lists didn't already exist, I would suggest creating a feature with a list template with OnQuickLaunch="true" and adding the lists via AddListFromFeature. Your other option would seem to be to write your own service to set the property through the object model.

dahlbyk
I hadn't actually tried OnQuickLaunch as it wasn't mentioned in the documentation I've been reading and low and behold it worked with the lists.UpdateList method. Thankyou!
keith
A: 

Best is to create a SPList object first an then perform OnQuickLaunch="true". Don't forget the update command!

Example:
Guid listID = Guid.Empty;
listID = siteObject.Lists.Add("Title","Description",listTemplateObject);
//This will work:
SPList thisList = siteObject.Lists[ListID];
thisList.OnQuickLaunch = true;
thisList.Update();
Cassy