Advertisement
Guest User

Untitled

a guest
Jul 25th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. var ctx = SP.ClientContext.get_current();
  2.  
  3. var factory = new SP.ProxyWebRequestExecutorFactory(this.appWebUrl);
  4. ctx.set_webRequestExecutorFactory(factory);
  5.  
  6. var appContextSite = new SP.AppContextSite(ctx, caller.parent.srcUrl);
  7. var hostweb = appContextSite.get_web();
  8. ctx.load(hostweb);
  9. console.log("URL: "+hostweb.get_lists().get_count());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement