/sharepoint-datamodel

A Sharepoint Services helper model to load, create and delete data from sharepoint lists

Primary LanguageJavaScript

sharepoint-datamodel

A Sharepoint Services helper model to load, create and delete data from sharepoint lists

Setup

var BlogPostsModel = new DataModel('posts', '/blog/');

Load Items

BlogPostsModel.load({count: 3}, 
  function(records) {
  
  });

Create New Item

BlogPostsModel.create([['Title', 'My Title'],['Body', '<p>My Content</p>']], 
  function(xData, Status) {
  
  });

Delete Item

BlogPostsModel.remove(1 , 
  function(xData, Status) {
  
  });