Export (0) Print
Expand All
5 out of 8 rated this helpful - Rate this topic

LightSwitch Apps for SharePoint

By using LightSwitch, you can easily create an app for SharePoint that users can install to and start from a SharePoint site. Users are authenticated automatically based on their SharePoint identities and permissions. For more information about apps for SharePoint, see Build apps for SharePoint.

LightSwitch apps can be autohosted on Office 365 or hosted in SharePoint 2013, either on your premises or at an external provider. Users discover and download apps from either the SharePoint Store or their organization's private app catalog and install them on their SharePoint sites.

When you enable an app for SharePoint, you gain access to the SharePoint client object model (CSOM), which you can use to write code that works with assets on your SharePoint site. For example, you might write code that initiates a workflow in SharePoint when a value in your app has changed. For more information about SharePoint client APIs, see How to: Complete basic operations using SharePoint 2013 client library code.

You can create either a Silverlight-based client or an HTML client for each LightSwitch app for SharePoint. If a LightSwitch project contains more than one type of client, you can’t enable the project for SharePoint.

Important noteImportant

You need Visual Studio 2012 Update 2 to use the SharePoint features in LightSwitch.

To create an app for SharePoint, you enable the SharePoint features in LightSwitch. This step adds a project and references to your solution that allow LightSwitch to communicate with SharePoint. When you debug your app, it’s deployed to the app web on SharePoint and then run locally in your browser.

To enable an application for SharePoint

  1. In Solution Explorer, open the shortcut menu for the Properties node, and then choose Open.

  2. In the Application Designer, choose the SharePoint tab, and then choose the Enable SharePoint button.

    NoteNote

    If the SharePoint tab doesn’t appear, you’ll need to upgrade the project first. On the menu bar, choose Project, Upgrade Project, and then follow the instructions in the wizard.

  3. In the Add SharePoint dialog box, enter the URL for your SharePoint site or the Office 365 Developer site.

    The URL for an Office 365 Developer site should take the form https://MySite.sharepoint.com/sites/Developer/.

  4. Choose the Validate button to ensure that the connection succeeds.

  5. In the Connect to SharePoint dialog box, enter your user name, enter your password, and then choose the Sign In button.

    For Office 365, the user name should take the form UserName@YourDomain.onmicrosoft.com. For an on-premise SharePoint site, use your Windows user name.

  6. In the Add SharePoint dialog box, choose the OK button.

    References to several SharePoint assemblies are added to your LightSwitch project, and a project for a nested SharePoint web app is added to the solution.

    NoteNote

    To display the SharePoint project, switch to File View in Solution Explorer.

Title

Description

Walkthrough: Creating an App for SharePoint by Using LightSwitch

Provides an end-to-end example of creating an app for SharePoint that's hosted on Office 365.

Walkthrough: Accessing a SharePoint Workflow from a LightSwitch Mobile App

Demonstrates how to create a SharePoint workflow for a LightSwitch client app that's written in HTML.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.