Wednesday, 4 September 2013

SharePoint Get Only List Items Count using Client Object Model

SP.SOD.executeFunc('sp.js', 'SP.ClientContext', function(){

           var ctx=new SP.ClientContext.get_current();
           var list = ctx.get_web().get_lists().getByTitle("TVC");
           ctx.load(list);

ctx.executeQueryAsync(Function.createDelegate(this, function(){
          console.log("List ID= "+list.get_id().toString());
          console.log("List Item Count= "+list.get_itemCount());
}), Function.createDelegate(this, function(){}));
});

Share This!


No comments:

Post a Comment

Translate

Total Pageviews

Powered By Blogger · Designed By Seo Blogger Templates