I am retrieving lists using NAPA. The problem is that to whichever site or site collection I add the app, I always receive only
- Composed Looks
- Master Page Gallery
This is very few given that a C# or Powershell code ctx.Web.Lists usually returns ca. 10 default ones (Taxonomy, Solution Gallery, Assets, etc.). This leads me to think that the lists queried come from a site created by the app itself:
I get the same results on all site collections. Full (almost) code:
var context = SP.ClientContext.get_current();
var web = context.get_web();
var lists = web.get_lists();
function listperms()
{
context.load(lists);
context.executeQueryAsync(onlistItemsSuccess, onWebPropsFail);
}
function onlistItemsSuccess(sender, args)
{
var listEnumerator = lists.getEnumerator();
while (listEnumerator.moveNext()) {
// shows the title of the list
}
context.executeQueryAsync();
}
Questions:
- How to make the code retrieve all lists in a web?
- Why are there only 2 lists in the app site?
0 commentaires:
Enregistrer un commentaire