我在SharePoint託管應用程序中遇到問題。我想要做的就是獲取應用程序正在運行的網絡列表,並使用這些列表。SharePoint應用程序開發與HostWeb的AppWeb通信
有了這個代碼,我得到的AppWeb名單:
this.web = context.get_web();
this.lists = this.web.get_lists();
this.context.load(this.lists);
我已經嘗試過類似的東西,以獲得從HostWeb名單:
this.context = new SP.ClientContext("https://sharepoint-server.com/_layouts/15/start.aspx#/");
var oWebsite = client.get_web();
this.lists = oWebsite.get_lists();
this.context.load(this.lists);
但它不會返回來自這個網站的列表。
有人可以幫我嗎?
非常感謝!