I'm trying to query for documents in a specified sub folder of a document library. Using U2U CAML builder, I can generate the query and return successfully within it.
However, when I run the query using set_viewXml it is still returning just the folders at the top level of the document library.
My Query is as follows:
camlQuery.set_viewXml('<View><GetListItems><Query /><ViewFields /><QueryOptions><Folder>' + folderPath + '</Folder><ViewAttributes Scope="Recursive" /></QueryOptions></GetListItems></View>');
Where folderPath is along the lines of 'libraryName/SubFolder/'