var web = context.get_web();
//Get all fields in site collection
FieldCollection collFields = web.AvailableFields;
currentcontext.load(this.collFields);
currentcontext.executeQueryAsync(Function.createDelegate(this, this.ExecuteOnSuccess),
Function.createDelegate(this, this.ExecuteOnFailure));
}
function ExecuteOnSuccess(sender, args)
{
var subsites = '';
for(int i=0; i
if(collFields[0].Title == "siteColumnName"){
alert("Got the Site col");
}
}
}
function ExecuteOnFailure(sender, args) {
alert("error");
}
Ads by Google
good post - suggested edits: no need for subsites var & would be helpful to include manipulating/updating the field!
ReplyDelete