Last active
December 17, 2015 22:59
-
-
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!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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