开发者

Is it possible to use SharePoint web services to retrieve all items in a folder with a given ID?

开发者 https://www.devze.com 2022-12-16 07:32 出处:网络
I\'m using the GetListItems method of the SharePoint List web service. I would like to get all items in a given folder, with a given ID (not path). The method allows you to pass in QueryOptions 开发者

I'm using the GetListItems method of the SharePoint List web service. I would like to get all items in a given folder, with a given ID (not path). The method allows you to pass in QueryOptions 开发者_Python百科xml, which lets you set the Folder path. However, since paths can change, this is not that useful to me, and it would be much better to be able to use the ID of the folder instead.

Does anybody know how to do that?


A workaround - one way you can do it, is to perform two queries - first, to find the folder by its ID (add 'FileLeafRef' to the list of needed fields), then make a recursive query, requiring the items to be in the folder with URL you got in the first cycle.

0

精彩评论

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