Skip to main content
added 37 characters in body
Source Link
Ganesh Sanap - MVP
  • 46.4k
  • 22
  • 31
  • 63

The method of setting the query options is a little different in the Client Object Model. The correct form of your query is:

<View>
    <Query>
        <Where>
            <Eq>
                <FieldRef Name='Category'/>
                <Value Type='Choice'>ValueA</Value>
            </Eq>
        </Where>
        <OrderBy>
            <FieldRef Name='Created' Ascending='FALSE' />
        </OrderBy>
    </Query>
    <ViewFields>
        <FieldRef Name='Title'/>
        <FieldRef Name='Value'/>
        <FieldRef Name='Created'/>
    </ViewFields>
    <RowLimit>6</RowLimit>
</View>

See this for more details: http://karinebosch.wordpress.com/2012/02/03/caml-and-the-client-object-model/CAML and the Client Object Model.

The method of setting the query options is a little different in the Client Object Model. The correct form of your query is:

<View>
    <Query>
        <Where>
            <Eq>
                <FieldRef Name='Category'/>
                <Value Type='Choice'>ValueA</Value>
            </Eq>
        </Where>
        <OrderBy>
            <FieldRef Name='Created' Ascending='FALSE' />
        </OrderBy>
    </Query>
    <ViewFields>
        <FieldRef Name='Title'/>
        <FieldRef Name='Value'/>
        <FieldRef Name='Created'/>
    </ViewFields>
    <RowLimit>6</RowLimit>
</View>

See this for more details: http://karinebosch.wordpress.com/2012/02/03/caml-and-the-client-object-model/

The method of setting the query options is a little different in the Client Object Model. The correct form of your query is:

<View>
    <Query>
        <Where>
            <Eq>
                <FieldRef Name='Category'/>
                <Value Type='Choice'>ValueA</Value>
            </Eq>
        </Where>
        <OrderBy>
            <FieldRef Name='Created' Ascending='FALSE' />
        </OrderBy>
    </Query>
    <ViewFields>
        <FieldRef Name='Title'/>
        <FieldRef Name='Value'/>
        <FieldRef Name='Created'/>
    </ViewFields>
    <RowLimit>6</RowLimit>
</View>

See this for more details: CAML and the Client Object Model.

Source Link
Vardhaman Deshpande
  • 10.5k
  • 1
  • 27
  • 52

The method of setting the query options is a little different in the Client Object Model. The correct form of your query is:

<View>
    <Query>
        <Where>
            <Eq>
                <FieldRef Name='Category'/>
                <Value Type='Choice'>ValueA</Value>
            </Eq>
        </Where>
        <OrderBy>
            <FieldRef Name='Created' Ascending='FALSE' />
        </OrderBy>
    </Query>
    <ViewFields>
        <FieldRef Name='Title'/>
        <FieldRef Name='Value'/>
        <FieldRef Name='Created'/>
    </ViewFields>
    <RowLimit>6</RowLimit>
</View>

See this for more details: http://karinebosch.wordpress.com/2012/02/03/caml-and-the-client-object-model/