开发者

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...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜