开发者

Access List items in hidden "Forms" folder using Lists.GetListItems

开发者 https://www.devze.com 2022-12-10 05:25 出处:网络
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 t

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 'Documen开发者_如何学Ct' 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?


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消