I am looking to query and display items from all of the lists that exist (and will exist in the future) on a specific subsite (SP 2013).
Below is what I have so far but it is not producing any alert, any help is greatly appreciated.
var siteUrl = '/mysite/mysubsite';
function retrieveAllListProperties() {
//var clientContext = new SP.ClientContext(siteUrl);
//var oWebsite = clientContext.get_web();
//this.collList = oWebsite.get_lists();
//clientContext.load(collList);
var clientContext = new SP.ClientContext(siteUrl);
var oWebsite = clientContext.get_web();
this.collList = oWebsite.get_lists();
this.listInfoCollection = clientContext.loadQuery(collList);
clientContext.executeQueryAsync(Function.createDelegate(this,
this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
}
function onQuerySucceeded() {
var listInfo = '';
var listEnumerator = collList.getEnumerator();
while (listEnumerator.moveNext()) {
var oList = listEnumerator.get_current();
listInfo += 'Title: ' + oList.get_title() + ' Created: ' +
oList.get_created().toString() + '\n';
}
alert(listInfo);
}
function onQueryFailed(sender, args) {
alert('Request failed. ' + args.get_message() + '\n' +
args.get_stackTrace());
}