I get an error after attempting to update an item SharePoint 2013. This one is a bit of a challenge since it's referencing a different file.
var siteUrl = _spPageContextInfo.webAbsoluteUrl
var clientContext = new SP.ClientContext(siteUrl);
var oList = clientContext.get_web().get_lists().getByTitle('Document Approval');
var oListItem = oList.getItemById(promise.responseJSON.d.results[0].ID);
oListItem.set_item('Role Status', roleStatus);
oListItem.update();
clientContext.executeQueryAsync(
Function.createDelegate(this, this.onAddSucceeded),
Function.createDelegate(this, this.onAddFailed)
);
I get the folllowing error that says "SCRIPT5007: Unable to get property 'apply' of undefined or null reference. File: ScriptResource.axd, Line 5, Column: 298"
Any ideas why?