Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

Recursive CAML Query

$
0
0

I am attempting to retrieve a document from a Sharepoint Document List, and I can't seem to get the search to run recursively.  This is my query:

                <View>
                    <Query>
                        <Where>
                            <Contains>
                                <FieldRef Name='FileLeafRef'/>
                                <Value Type='Text'>{docTitle}</Value>
                            </Contains>
                        </Where>
                        <QueryOptions>
                            <ViewAttributes Scope='Recursive' />
                        </QueryOptions>
                        <RowLimit>1</RowLimit>
                    </Query>
                </View>

The query works properly, as long as the document is in the Shared Documents root (that's the list I'm searching).  But, if I move the document to a subfolder of Shared Documents, the return is "Enumeration yielded no results".

Any advice is appreciated.

Thanks!


Viewing all articles
Browse latest Browse all 11571

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>