Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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);
- }
- });
Add Comment
Please, Sign In to add comment