I am having a list Objectives with column STATUS and Reason
I used
<script language="ecmascript" type="text/ecmascript">
ExecuteOrDelayUntilScriptLoaded(ViewItem, "sp.js");
function ViewItem()
{
var context = new SP.ClientContext.get_current();
var web = context.get_web();
var list = web.get_lists().getByTitle('Objectives');
var query = SP.CamlQuery.createAllItemsQuery();
allItems = list.getItems(query);
context.load(allItems, 'Include(STATUS)');
context.executeQueryAsync(
Function.createDelegate(this, this.success), Function.createDelegate
(this, this.failed));
}
</script>
I need Only Status column to be fetched.I need camlquery and i dont know where to write.