views:

310

answers:

2

Is it possible to access the list items in the (hidden) "Forms" subfolder of a document library using the Lists.GetListItems web service method? I need to set the content type of uploaded document templates using Lists.UpdateListItems, otherwise, document created from these templates will have the 'Document' content type and not the content type the template had been assigned to.

Lists.UpdateListItems works in subfolders of the "Forms"' folder, but I need the ows_UniqueId of the list item that represents the uploaded file, and I can only get it using List.GetListItems.

Is there maybe another method of uploading files to SharePoint document libraries, in which you can set the content type?

A: 

List.GetListItems expects you to pass it a view, if you don't it uses the defaults view. So what you need to do is create a seperate view which lists all items, and make this view list flat (not listing by subfolder).

Then query against this view.

Does this suck? Yes. Does SharePoint suck? I'll let you answer that question. I didn't write sharepoint, just telling you the way it is.

JL
A: 

I don't understand the relationship between the content type of an uploaded document in a document library and the elements in the Forms subfolder.

What I'd try: - Use Copy Web Service, method CopyIntoItems to upload the file, setting some properties, including the content type. - Use Lists.GetListItems, with a CAM query specifying the file name and asking for ows_UniqueID property

Timores