Join Robert Bogue for an in-depth discussion in this video Getting data from SharePoint, part of Developing SharePoint Full Trust Solutions for SharePoint 2013.
- Let's take a look at what it means…to get data out of Sharepoint.…And so, in your example files,…in the Chapter 3 ClientAndData folder,…you'll find a ClientAndData solution file.…And when you open it, you'll have this project.…And in the DataWebPart,…it's a web part for displaying data,…so we're going to take a look at that,…so when we open it up…we'll see the kind of derive from WebPart that we expect,…we see a property, ListUrl,…which is appropriately declared…so that we can edit that as a web part property,…and then inside of CreateChildControls,…there's a little bit of magic happening.…
And first of all we put everything in a try-catch block…so that if we get an error we can capture that on the screen…versus throwing an exception.…We are going to get the serverRelativeListUrl,…and we're going to do that by looking at SPContext,…that is our current context in Sharepoint,…we're going to get the Current Web,…and it's ServerRelativeUrl.…And then we're going to tack on to that the ListUrl…that was provided by the user.…
If you've wanted to learn how to develop custom solutions on SharePoint—or you've been told that you need to develop a solution that integrates with SharePoint—this is the training you need. It's quick, to the point, and effective at helping new developers work with SharePoint code.
Robert Bogue shows how to create new web parts, access and update data in SharePoint, work with files, and create SharePoint artifacts: lists and libraries to store data, site-level features, files, etc. He also shows how to create sandbox solutions that do not affect the rest of the server environment, and discusses execution options for solutions, including in-page, quasi-page, and out-of-page execution.
- Developing a web part
- Connecting and configuring web parts
- Building sandboxed code
- Choosing an access method for SharePoint data
- Querying with CAML
- Fetching files
- Updating SharePoint data
- Creating and provisioning artifacts
- Executing long-running operations
- Tinkering with timer jobs
- Understanding SharePoint execution workflow