vendredi 2 janvier 2015

Create context for another site collection using NAPA



I am trying to access another site collection using NAPA. I found 2 ways, none of which seem to be working


Office 365- Accessing lists refers wrong URL (URL/App name)



var context = new SP.AppContextSite(SP.ClientContext.get_current(), 'https://URL/sites/DevSite/');


The code stops at this line.




http://ift.tt/1xeQR8K



$(document).ready(function () {

var appWebUrl1 = decodeURIComponent(getQueryStringParameter("SPAppWebUrl"));
var hostWebUrl1 = decodeURIComponent(getQueryStringParameter("SPHostUrl")); var factory;

this.context = new SP.ClientContext(appWebUrl1);
factory = new SP.ProxyWebRequestExecutorFactory(appWebUrl1);
this.context.set_webRequestExecutorFactory(factory);
this.hostContext = new SP.AppContextSite(context, hostWebUrl1);


getQueryStringParameter is underlined in red as "undefined"








0 commentaires:

Enregistrer un commentaire