Saturday, 15 March 2014

sharepoint list client object model getItems using query

sharepoint list client object model getItems using query
var camlQuery = new SP.CamlQuery();
camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef Name=\'MyColumn\'/>' +
'<Value Type=\'Text\'>Test</Value></Eq></Where></Query></View>');
--------------------
var camlQuery = new SP.CamlQuery();
camlQuery.set_viewXml('<View><Query><Where><Geq><FieldRef Name=\'ID\'/>' +
'<Value Type=\'Number\'>1</Value></Geq></Where></Query><RowLimit>10</RowLimit></View>');
this.collListItem = oList.getItems(camlQuery);