Share via


Exception HRESULT: 0x80131904 when list Item created in Sharepoint Online

Question

Monday, June 27, 2016 11:58 AM

Dears,

I am getting the error HRESULT: 0x80131904 when I create list item in bulk(36).

sometimes all creates without error, sometimes 14 will return this error and sometimes 1 error.

I searched most of them were suggesting SQL server content database may be out of space :

We cannot check this directly as we have SharePoint online. But we tried to increase the quota for the site. but still we receive the same error.

this is how my code looks like

sample values

CreateNewDetails(460, 57, Yes, "test" , 1, Guest_Totalbtn)

var controleName="";
function CreateNewDetails(HeaderId,LineDetailsID,standard,remarks,Score,ctName) {
    controleName="";
    controleName=ctName;
    var siteUrl = 'https://xxxxxxxxxxxxxxxxx/intranet/projects';
    var clientContext = new SP.ClientContext(siteUrl);
    var oList = clientContext.get_web().get_lists().getByTitle('AC_VR_Details');   
    var itemCreateInfo = new SP.ListItemCreationInformation();
    this.oListItem = oList.addItem(itemCreateInfo);
        var vdate= new Date($("#Vdate").val());
    oListItem.set_item("Title","AC-VR-"+vdate.toLocaleString(vdate, { month: "long" })+"-"+$("#Brand :selected").text()+"-"+$("#Location :selected").text()+"-"+$("#LocationType :selected").text());
    oListItem.set_item('Header',HeaderId );
    oListItem.set_item('DetailsLineID', LineDetailsID);
    oListItem.set_item('Standard', standard);
    oListItem.set_item('Remarks', remarks);
    oListItem.set_item('Score', Score);  
    oListItem.update();   
    clientContext.load(oListItem);   
    clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceededD), Function.createDelegate(this, this.onQueryFailedD));
    }
    
    function onQuerySucceededD() {
    console.log('Item created: ');  
    }
    
    function onQueryFailedD(sender, args) {   
    alert('Could not save all items. ' + args.get_message() + '\n' + args.get_stackTrace());
    }

Any help is highly appreciated.

thanks in advance

Binu Thomas

All replies (3)

Tuesday, June 28, 2016 2:03 PM ✅Answered | 1 vote

If you are getting this intermediately and if you are able to add items after some time interval then it might be SharePoint Online throttling. (its very unlikely for 14 items getting created in loop)

Try the incremental back-off technique for adding items, refer the below article

https://msdn.microsoft.com/en-us/library/office/dn889829.aspx?f=255&MSPPError=-2147217396

Rajesh
rjesh.com| @rjesh
You don't need to buy me a beer, if helpful just smile, vote, and mark it as answer.


Monday, June 27, 2016 1:34 PM

Are you calling this method in a loop? that's what you meant as bulk?

Rajesh
rjesh.com| @rjesh
You don't need to buy me a beer, if helpful just smile, vote, and mark it as answer.


Tuesday, June 28, 2016 6:23 AM

Yes I am calling it  in a loop.