I'm really having trouble debugging this simple task: Read items from the host web in an app.
I've tried several examples but getting various errors. Problem is that the errors are in Norwegian. That is really difficult to debug...
This is my code:
var context = new SP.ClientContext(appweburl); var appContextSite = new SP.AppContextSite(context, hostweburl); var list = appContextSite.get_web().get_lists().getByTitle('List1'); itemsInlist = list.getItems(); context.load(itemsInlist); context.executeQueryAsync(....)
And in my error handler I get this error "Ukjent feil" (it translates to "unknown error"). The error is read out from a call to args.get_message()
If I instead only list items query for all lists i get the expected lists returned. But to get the actual list items - that seems to be impossible...
Yes, I've given the correct access - full control to list when installin the app.
(The code above is fetched from this link. I've also tried several other samples. They work for getting the lists, but not the list items. )
I be really happy if someone could provide some hints on what to try.