Skip to content

Instantly share code, notes, and snippets.

@vman
Created January 25, 2012 14:19
Show Gist options
  • Save vman/1676464 to your computer and use it in GitHub Desktop.
Save vman/1676464 to your computer and use it in GitHub Desktop.
deletecoffee
DeleteItem = () ->
context = new SP.ClientContext.get_current()
list = context.get_web().get_lists().getByTitle "CoffeeList"
listItem = list.getItemById 1
listItem.deleteObject();
context.executeQueryAsync ->
#Success Callback
alert "Item Deleted"
, (sender,args)->
#Failure CallBack
alert "Failed. #{args.get_message()} \n #{args.get_stackTrace()}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment