In this post we will develop a SharePoint List in SharePoint hosted App.
SharePoint apps designed to provide specific functionality in SharePoint. So in this article we will talk about a simple scenario of adding the list. That is how we are normally going to use and develop the Apps on SharePoint. Follow below step by step instruction to create a List in SharePoint Hosted App.
Open Visual Studio 2015 and create SharePoint Add In Project.
Now Add New Item for Site Column. Name it "MyCustomCol".
Add New Item for Custom Content Type, name it "MyContentType"
Inherit Item content type on next wizard page and click on Finish.When MyContentType configuration page shows up, Select columns based on need along with custom created columns.
SharePoint apps designed to provide specific functionality in SharePoint. So in this article we will talk about a simple scenario of adding the list. That is how we are normally going to use and develop the Apps on SharePoint. Follow below step by step instruction to create a List in SharePoint Hosted App.
Open Visual Studio 2015 and create SharePoint Add In Project.
Add New Item for Custom Content Type, name it "MyContentType"
Inherit Item content type on next wizard page and click on Finish.When MyContentType configuration page shows up, Select columns based on need along with custom created columns.
Now Add new Item - Select List - and Name list as MyInterviewSchedule.
Make changes based on need.
Now next page will open in Visual Studio for Selecting Columns/ Content Type. Click on button to select our custom content type.
Select our custom content type from list. Remove other if needed.
Now columns are displayed in the List.
Build Project and Click on Deploy.Now on your SharePoint site you will see the App, in my case it is "Create List" under Site Content.
Now clicking on it will launch Default.aspx of the app.
But now where is my list which I have created and defined in Visual Studio? To Set list as starting page when we deploy app. We have to change Appmanifest.xml start page settings as "CreateList/Lists/MyInterviewSchedule".
Now Build and Deploy App. Once deployed click on "CreateList" app it will launch MyInterviewSchedule list default. Click on New item will launch below form.
Conclusion:
We learned how to develop SharePoint list in SharePoint hosted App.
0 comments:
Post a Comment