I'm trying to create an item in a task list.
function CreateTask() {
console.log('Creating Task');
var clientContext = new SP.ClientContext.get_current();
var oList = clientContext.get_web().get_lists().getByTitle('Workflow Tasks');
clientContext.load(oList);
var itemCreateInfo = new SP.ListItemCreationInformation();
this.oListItem = oList.addItem(itemCreateInfo);
oListItem.set_item('Title', 'Read Notification: Javascript');
oListItem.set_item('Body', 'Hello World!');
oListItem.set_item('ContentType', 'Mark As Read');
oListItem.update();
}I keep getting the following error:
If I comment out the Content Type it works.
David Jenkins