I am using SharePoint REST API to update the values in columns in document library. Below is the code.
var url= "http://mycompany.sharepoint.com/site1/_api/Web/Lists/GetByTitle('My Library')/Items(7)/file/listitemallfields/ValidateUpdateListItem";
$.ajax(
{
'url': url,
'method': 'POST',
'data': JSON.stringify({
'formValues': [
{
'__metadata': { 'type': 'SP.ListItemFormUpdateValue' },
'FieldName': 'NoteCol','FieldValue': 'Test Value'
}
],
'bNewDocumentUpdate': true,
}),
'headers': {
'accept': 'application/json;odata=verbose',
'content-type': 'application/json;odata=verbose',
'X-RequestDigest': $('#__REQUESTDIGEST').val()
},
'success': function (data) {
console.log(data);
},
'error': function (err) {
console.log(err.responseJSON.error.message.value);
}
});
The above code is working fine if the NoteCol
column is of TEXT type. But my requirement is to make the column of type MULTILINE. But the above code is not working if I am trying to insert more than 255 characters which should not be the case as 255 characters if the limit for TEXT type column.
Any idea what is going wrong..
Thanks in advance..!!