Updated: Jan 30
In this article I am going to demonstrate how we can create an App with Announcement list. Creating Apps is simple in SharePoint, this article is mainly targeted for freshers to SharePoint 2013.
Steps to Create App
1. Run Visual studio as administrator and create new SharePoint 2013 App.
2. Provide a web URL in which you are going to deploy this App and select option SharePoint-hosted option.
3. Add SharePoint list (name as Announcements) to that project,
4. Select Announcements list template to create this list.
5. Add new announcements to the list, add below data rows in ‘Announcement’ List Element file. This will add the events.
<?xml version="1.0" encoding="utf-8"?>
Description="My List Instance">
<Field Name="Title">RK Announcement 1</Field>
<Field Name="Title">RK Announcement 2</Field>
<Field Name="Title">RK Announcement 3</Field>
<Field Name="Title">RK Announcement 4</Field>
<Field Name="Title">RK Announcement 5</Field>
6. Deploy the project and browse the App.
7. Edit the default home page and add WebPart zone to that and add the announcement list which we created in the App.
<h1>My App with Announcement List !!!</h1>
<!-- Adding webpart zone to add the announcement list -->
<WebPartPages:WebPartZone runat="server" FrameType="TitleBarOnly"
runat="server" ListUrl="Lists/Announcements" IsIncluded="True"
NoDefaultStyle="TRUE" Title="Announcements" PageType="PAGE_NORMALVIEW"
8. Browse the home page, the app is created with the announcement list with added announcements.
Hope this article helps you in creating simple SharePoint Online Apps with Lists, we can also create custom lists where we manually need to add the fields and others.