Skip to content

Instantly share code, notes, and snippets.

@RyanHirsch
Last active December 17, 2015 22:59
Show Gist options
  • Select an option

  • Save RyanHirsch/5686356 to your computer and use it in GitHub Desktop.

Select an option

Save RyanHirsch/5686356 to your computer and use it in GitHub Desktop.
Test updating an append only field to see if we need to do actual checkouts for SharePoint 2010 javascript CSOM SPOILER: We don't!
var ctx = new SP.ClientContext("/");
var web = ctx.get_web();
var warList = web.get_lists().getById("8F7087E5-DFBE-4459-AFA5-0D44ACE783E0");
var item = warList.getItemById(1);
ctx.load(web);
ctx.load(warList);
ctx.load(item);
ctx.executeQueryAsync(function() {
item.set_item('SiteColumn_ConsolidatorSummary', "what it is, what it is");
item.update();
ctx.load(item);
ctx.executeQueryAsync(function() {
console.log('SUCCESS!');
},
function() {
console.log('error');
});
},
function() {
console.log('error');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment