Question

It try retrieving all Comments from a single person inside a discussion board. This is the CAML:

<View>
  <QueryOptions><ViewAttributes Scope='RecursiveAll' /></QueryOptions>
  <Query>
    <Where>
      <Eq>
        <FieldRef Name='Author' LookupId='TRUE'/>
        <Value Type='Lookup'>10</Value>
      </Eq>
    </Where>
  </Query>
  <ViewFields></ViewFields>
</View>

When looking at that List manually I can see that there are discussions with comments from the author with id "10"

But when I run this query all I retrieve is an empty result.

Was it helpful?

Solution

Solved this. Did not work with QueryOptions, but with

<View Scope='RecursiveAll'>
<Query>...</Query>
</View>

instead

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top