Question

I've seen that when I create an Autohosted App for SharePoint 2013 (or any other type of Apps), I'm then able to add a new item to the SharePoint Project such as a List.

I can then add/edit/delete fields of this lists through Visual Studio but when I deploy the App on my SharePoint-Online site, I can't see if or where the lists are created.

Could you please tell me :

  1. Are the lists in my App available somewhere on my site when my app is published?
  2. How can I access theses lists contained in my App? (or what are the purpose of theses lists in my App if I can't access them...)

Thanks a lot !

By the way here is a screenshot of my projects in VS2012 :

SharePoint Project

Was it helpful?

Solution

It is available on the App Web under

"The APPWEB URL"/Lists/"The list internal name"

But really you should access the list (CRUD items) via Client object model or REST.

The list is meant to be "hidden" to the users of the app, and it is upp to you to provide interfaces to work with items in the list

And just a clarification: You need to use SharePoint hosted app to be able to use SharePoint artifacts like Lists directly in the App project

Though this one tells another story: enter image description here

While this below tells this story (MSDN):

SharePoint-hosted apps for SharePoint are installed on a SharePoint 2013 website, called the host web, and that have their resources hosted on an isolated subsite of a host web, called the app web. This approach enables you to reuse common SharePoint artifacts, such as lists and Web Parts. When you take this approach, you can use only JavaScript and you cannot use any server-side code.

Benefit: This approach enables you to reuse common SharePoint artifacts, such as lists and Web Parts.

Consideration: You can use only JavaScript in the app, and you cannot use any server-side code.

http://msdn.microsoft.com/en-us/library/fp179887.aspx describes different hosting alternatives and their ups and downs. (But it is surely not too extensive)

So, you could use a List also in the other hosting alternatives, it will be added to the App Web though.

OTHER TIPS

We can create our custom SharePoint artefacts like list,content types as part of our Auto Hosted or Provider hosted apps too and not only in SharePoint Hosted apps.

Your feature and list will be deployed in the AppWeb which is a subsite that gets created whenever a new app is created. So instead of checking for the list and the feature in the host web, You can see them as part of the AppWeb.

You can find the AppWeb's url from Site Settings->Site Collection Administration section->Site hierarchy, Title will be your App name.

Once you know the url, You can visit the manage features page of the App Web through "URL_of_app_web/_layouts/15/ManageFeatures.aspx". Here you can see your feature already activated if it has been properly deployed.

And to see your list visit "URL_of_app_web/lists/list_internal_name". Here you can see your list along with his items.

Following is a detailed guide on creating custom SharePoint artefacts in Auto Hosted and Provider Hosted apps,

http://msdn.microsoft.com/en-us/library/office/fp179936.aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top