Hey 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