How can I get title and url using allproperties? I can get custom proeprty but do not know how to get title and url.
I am not able to know as why I get the alert twice in the following code,
function onGetSubwebsSuccess(sender, args) {
var webEnumerator = webCollection.getEnumerator();
while (webEnumerator.moveNext()) {
var web = webEnumerator.get_current();
this.props = web.get_allProperties();
context.load(this.props);
context.executeQueryAsync(Function.createDelegate(this, gotProperty), Function.createDelegate(this, failedGettingProperty));
}
}
function gotProperty() {
var myPropBag = this.props;
alert(myPropBag.get_fieldValues()["AllowUser"]);
and how can I send web into the gotProperty method.
Please donot answer what i already know and understand the question Please
I know how to get title and url but look, I want to get web's title, url and a custom property bag and then add them to a html table, If that makes me more understandable ? Thank You
I am getting sub webs and then each sub webs property bag, now because its a Async query enumerator isnot waiting for query to complete and moves to next web. So I am not able to match which web has what title url and there custom property.
whileand then use a singleexecuteQueryAsyncoutside of thewhileto load the webs at once.