Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Caml Query- Order By- SharePoint 2013-CSOM

$
0
0

Hi All,

I am new to caml query and have been struggling for this.
I need the last modified List Item. Only one Item.
That means it should be orderby 'modified' and rowlimit should be 1.

But only rowlimit part of my query is working. Not the orderby part.

This is my Query : 

var camlQuery = new SP.CamlQuery();
camlQuery.set_viewXml('<View><Query><OrderBy><FieldRef Name=\'Modified\' Ascending="FALSE"/></OrderBy><RowLimit>1</RowLimit></Query></View>";')

I dont know where I am going wrong.
I even tried removing the Query tags in the above mentioned query. 

The query is working, its getting only one record. orderby isnt working i believe. 
Please help me.

Thanks.


Viewing all articles
Browse latest Browse all 7589

Trending Articles



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