Created
March 12, 2015 09:53
-
-
Save wictorwilen/7e89d3e55f705c8eb85d to your computer and use it in GitHub Desktop.
Enumerate SPWeb properties in JSOM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var context = SP.ClientContext.get_current() | |
var web = context.get_web() | |
var props = web.get_allProperties() | |
context.load(web) | |
context.load(props) | |
context.executeQueryAsync( | |
function () { | |
var t = "Properties\n" | |
for (var z in props.get_fieldValues()) { | |
t += z + ": " + props.get_item(z) + "\n" | |
} | |
alert(t) | |
}, | |
function () { | |
alert('Error') | |
}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment