Sharepoint 2013 server side

Sharepoint 2013 server side

ramky.drkramky.drk Posts: 1Questions: 1Answers: 0

How to handle large SharePoint list (20000) by implementing server side processing,

could you please send me sample code

Answers

  • fabianmunozagfabianmunozag Posts: 2Questions: 0Answers: 0

    Hi,
    I used the following code inside a function where I initialize the table.
    Hopefully this will help you:

    $.ajax({
    method: 'GET',
    url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('Personas')/items?$select=Title,Nombre,Paterno,Materno,Identificacion&$top=20000",
    headers: {'Accept' : 'application/json; odata=verbose'},
    success: function(data) {
    $('#tblMyHTMLTable').DataTable({
    "bDestroy": true,
    "bProcessing": true,
    "aaData" : data.d.results,
    "aoColumns" : [
    { "mData": "YourTableField1" },
    { "mData": "YourTableField2" },
    { "mData": "YourTableField3" }
    ]
    });
    }
    });

This discussion has been closed.