Hi ,
I am trying to find the site owner here is my code,
$(document).ready(function () { ExecuteOrDelayUntilScriptLoaded(retrieveWebSite,"sp.js"); }); function retrieveWebSite() { var clientContext = new SP.ClientContext.get_current(); oSite = clientContext.get_site(); oWebsite = clientContext.get_web(); clientContext.load(oSite); clientContext.load(oWebsite); clientContext.executeQueryAsync( Function.createDelegate(this, this.onQuerySucceeded1), Function.createDelegate(this, this.onQueryFailed1) ); } function onQuerySucceeded1(sender, args) { var htmlString = "Site Owner: " + oSite.get_owner.name; $("div.Details").html(htmlString); } function onQueryFailed1(sender, args) { alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace()); }Here the oSite.get_owner.name always returns a blank value. What am I doing wrong? Please let me know
Student For Life