I have an issue with our Travel Tool based on SharePoint 2013.
This tool consists of different Content Types - all in their specific lists (travel requests, train rides, flights, etc.). There are two main groups which are using this tool: Employees (contribute) and admin staff (full control). On the homepage.aspx we have a ScriptEditorWebpart with a custom HomePageNewItem button and a ListView of the travel requests. When the user clicks on the custom button, a new ListItem is created via REST API and the EditForm.aspx of the currently created ListItem is displayed.
What is the problem?
This works just fine for the admin staff (full control). When employees try to create a ListItem, the following error message occurs: HRESULT: 0x80131904 (returning from the REST API). The same happens, when employees visit some of the lists. The ListView isn’t displayed, but there is the same error message.
Some additional information
- The SQL database has enough storage on all partitions
- When an employee uses the standard “New Item” Button, everything works just fine (except of the ListView)
- When an employee is moved to the admin staff group, everything works just fine
- All lists have correct permissions set
- This worked one week before and there were no changes in the code, only some customizations of sites e.g. homepage.aspx)
Additional hints
Could it has something to do with the Website Definition?
The function which creates the list item
function createListItem(listName, newItem, success) {
var itemType = getItemTypeForListName(listName);
newItem.__metadata = { "type": itemType }
$.ajax({
url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('" + listName + "')/items",
type: "POST",
contentType: "application/json;odata=verbose",
data: JSON.stringify(newItem),
headers: {
"Accept": "application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val()
},
success: function (data) {
success(data);
},
error: function (data) {
var errorMessage = JSON.parse(data.responseText).error.message.value;
var statusId;
statusId = SP.UI.Status.addStatus("Hoppla:", errorMessage);
SP.UI.Status.setStatusPriColor(statusId, "Blue");
setTimeout(function () { SP.UI.Status.removeStatus(statusId); },10000);
}
});
}
function getItemTypeForListName(name) {
return "SP.Data." + name.charAt(0).toUpperCase() + name.split(" ").join("").slice(1) + "ListItem";
}
Thanks in advance Benjamin