In this exercise you experience installing a Microsoft Access–created app for SharePoint from the SharePoint Store on Office.com and then you build an app for SharePoint using Access and Access Services.
1. Log in to Office 365 Developer Site and navigate to the site collection where you will install an app for SharePoint.
2. Click Site Contents. On the site Contents page click Add an app.
3. On the Your Apps page, in the left navigation bar, click SharePoint Store.
4. On the SharePoint Store page, in the search bar, type business contact and click the search icon. When the Business Contact Manager app appears, click the tile.
5. On the Business Contact Manager page, click ADD IT.
6. On the Confirm that you wish to add the app page, click Continue.
7. On the You just got this app for everyone in your organization page, click Return to site.
8. On the Do
you trust Business Contact Manager page, click Trust It. SharePoint
adds the app to your site and will refresh the tile when the app is
fully added.
9. Click the Business Contact Manager tile to open the app.
10. Click your
way around the UI to get a sense for what the app does, but then click
the About navigation link and watch the 2:25–minute demo of how to use
this app for SharePoint.
11. Click the
Back to Site link in the top navigation bar to return to the SharePoint
site. You can return to the Business Contact Manager app any time by
clicking Site Contents.
12. To build an app for SharePoint using Microsoft Access, open Access 2013.
13. Access
opens and displays a number of templates that you can use as a quick
start foundation for your app. Notice the difference in the graphics
used for the template icons. Any graphic that has the globe on it is a
Web App for SharePoint. If you choose the Custom web app template, then
you start building your app from scratch. For this exercise, select the
Asset tracking template.
14. In the Asset tracking dialog, provide C14AssetTracking
for the App Name, skip the Available Locations, and directly enter the
full URL to the Office 365 site collection you want to use to build the
app.
15. Before you
make any changes, click the File tab and click Info. Here you can see
the server and database name for the Windows Azure SQL Database that
was created for your app. Notice that you can create a client-only
database for reporting that will be a read-only connection to the Azure
database. You can also manage a variety of other types of connections
from the Info page, too, by clicking the Manage button. Return to the
Access design page.
16. In the ribbon, click Launch App. Notice how quickly Access Services renders the app. Return to the Access client.
17. In the ribbon, click Navigation Pane; this provides a handy reference to all the Access objects used in your solution.
18. In the
ribbon, click Table to get the Add Tables page. You have an array of
options for creating a new table. Notice at the bottom of the page
these include options such as other Access databases, Excel tables,
SharePoint Lists, and more. A significant feature for this release is
the Create a new table using our templates search bar at the top. This
is backed by a Microsoft-provided Web service that can continuously be
updated with new template table structures. The intent is that you
don’t need to necessarily do the work of laying out table columns and
data types, but you can pull down a table that’s “close” to what you
need and then augment it with your own custom columns. Type person in the search bar and click the search icon.
19. Select
Vendors from the list. Notice in the Navigation Pane that a new Table
was added for Vendors, as well as a Vendors Datasheet and Vendors List.
20. In the Navigation Pane, right-click the Assets Table and select Design View.
21. In the Field Name column, after Owned by, enter Vendor; in the Data Type column enter Lookup.
22. In the Lookup Wizard, select “I want the lookup field to get the values from another table or query.” Select Table: Vendors, select Company from “Which value do you want to display in your lookup?”, leave the remaining default values, and click OK.
23. In the Assets design view, in the Description column, enter Lookup to Vendors table.
Close the design view by clicking the “x” on the right side across from
the Assets tab. When prompted to save changes, click Yes. Notice on
your Assets form that the Vendor lookup field was automatically added.
24. In the
ribbon, click Launch App. In the left navigation bar, click Vendors and
click the + to add a new vendor. Fill out any data fields you want, but
at least enter a Company name because this is the field that you
selected to show in the Assets form lookup field. Click the Save icon
to save the information and then re-edit it to add an asset to the
vendor. (Note that the vendor must be saved before you can associate an
asset with it.) At the bottom of the vendor form, click the Add Assets
link.
25. In the Assets form you can provide data values, but notice that your Vendor has already been selected. Save the form.
26. You can now explore the UI, and enter Assets using the Assets form or from the Employees form. Return to Access.
27. At this
point your solution can only be used by you in the specific site
collection where you are building the app. To make this into an app for
SharePoint that can be deployed to the corporate app catalog on
SharePoint or distributed through the SharePoint Store, click the File
tab and click Save As.
28. In the Save As dialog, under File Types, click Save Database As if it is not already selected, and click Save as Package.
29. In the Create New Package from This App dialog, provide a name of C14AssetTracking for the Title and do not include data in the package. When prompted, save the file to a location on your disk.
30. Log in to your Office 365 Developer Portal SharePoint Admin center, click the app’s link and click the App Catalog link.
31. On the App Catalog page, click the Apps for SharePoint link.
32. On the
Apps for SharePoint page, click New app and Browse to the file you just
saved. Select it, and click Open. Click OK to add the document.
33. In the Apps for SharePoint C14AssetTracking.app
dialog, leave all the defaults and click Save. You can now navigate to
any other site collection within your Office 365 tenancy, click Site
Contents, click Apps from your Organization, and install your C14AssetTracking app for SharePoint into that site collection. When you install and run the app it should look something like Figure 1.
In the first part of this Try It Out
you navigated to the SharePoint Store, selected an app, and SharePoint
installed it into the site collection. But the installed app for
SharePoint is available across all the sites in your Office 365
tenancy. So if you navigate to any other site collection and click Site
Contents, you will be able to add this app in this site too. Regarding
how it works, at the point you clicked the Trust It button, SharePoint
began installing the app and automatically provisioned a Windows Azure
SQL Database for the app. When the install completed and you clicked
the Business Contact Manager tile to view the app, Access Services was
invoked. It then rendered the HTML-based UI elements, executed any
business logic, and managed the connection and calls to the back-end
SQL database.
You then created an app for SharePoint
using an existing template as a base. To the base solution you searched
via a Microsoft Web service for a template table that you could simply
add in to your solution. After selecting a table you wired it up to an
existing form and Access did all the work to adjust the UI elements
accordingly. You then tested the app for SharePoint by launching it.
When the app was complete you generated an app package for distribution
through any number of channels you might choose.