I am trying to rename a folder inside a Document library. Right now I get my item and everything is good but when I try to rename it using set_item('title', 'NewFolderName')
it crashes and unwinds the stack.
Is there some kind of documentation that would help us with that? Should I be doing this on the backend instead of the frontend?
Working
context = SP.ClientContext.get_current();
var iter = folderList.getEnumerator();
iter.moveNext();
var folder = iter.get_current();
folder.set_item('Title', 'TestTitleRename');
folder.set_item('FileLeafRef', 'TestTitleRename');
folder.update();
context.executeQueryAsync(Success,Failure);
Thanks