列 STATUS と Reason を含むリスト Objectives を持っています
使った
<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>
取得する必要があるのは Status 列のみです。camlquery が必要ですが、どこに書き込むべきかわかりません。