Friday, February 12, 2016

How to delete bulk items and all items in custom list using SPServices

<input id="btnDeleteItem" type="button" value="Delete all items" />


$('#btnDeleteItem').click(function()
{


DeleteAction();

});


function DeleteAction()
{
$().SPServices.SPUpdateMultipleListItems({
  listName: "SupportTable-OLEMData",
  CAMLQuery: "<Query><Where><IsNotNull><FieldRef Name='Title' /></IsNotNull></Where></Query>",
  batchCmd: "Delete"
});
alert("All items are deleted!");
}

No comments:

Post a Comment