Sharepoint CAML query to search folder on ID field
Using CAML in WSS3, I am trying to search for a folder by the folder 开发者_运维问答ID field. This results in 'undefined' when searching the 'Folder' content type but works fine searching for a regular item.
Here is a snippet of my code:
<Query><Where><Eq><FieldRef Name='ID'/><Value type='Integer'>"+folderIDtoFind+"</Value></Eq></Where></Query>
...
<QueryOptions><ViewAttributes Scope='Recursive' /></QueryOptions>
Any suggestions for how I can find folders by their id's?
Try
<Query><Where><Eq><FieldRef Name='ID'/><Value type='Counter'>"+folderIDtoFind+"</Value></Eq></Where></Query>
Also, grab a copy of A CAML builder tool...
精彩评论