none
Sharepoint 2013 list bulk add and delete list item using jquery? RRS feed

  • Question

  • Hi All

    I have a grid which is having more than 2000 records belongs to particular id, but that sharepoint list holding more than 10000 list item but I need to delete 2000 records belongs to particular id. When I tried to add or delete more than 1000 list item using jquery. Im getting an error like "Resource has too may resources". Is there any way to do in batch process deletion?


    Please find the code below which im using

    For Deletion:

    function bulkDelete(listName) {

       
    gridColl=$("#Table").jqGrid('getGridParam','selarrrow'); 
     
     var clientContext = SP.ClientContext.get_current();
        var oList = clientContext.get_web().get_lists().getByTitle(listName);

        for (var i = 0; i < gridColl.length; i++) {
          
     this.oListItem = oList.getItemById(gridColl[i]);      
     oListItem.deleteObject();
      
        }
     clientContext.load(oList);
        clientContext.executeQueryAsync(onMultiDeletionSucceess(type), onMultiDeletionFailed);
    }

    Also I have requirement for adding more than 1000 list item at  time which belongs to particular id.

    Could anyone help me to get done this. Thanx in advance.

    Regards

    Manikandan C







    Friday, May 19, 2017 12:07 PM