Lightning Connect includes External Data Sources and External Objects. You can try this in your free developer edition. There’s a nice blog that talks about setting up a more custom data service and covers a bit more about why this is super cool. Andy Mahood also blogged about this recently, including more details on related lists and Chatter.
Lightning Connect is the new service from Salesforce that lets you bring OData content into your Salesforce org. I was curious how to test it, so I thought I’d share what I found.
Step 1: Locate Sample Data
OData is a protocol for exchanging .. er … data, so it makes sense that you could probably find some sample data to connect to. A bit of the old Google led me to this sample data page where you can click on a tab to see “V2” sources.
When you click on the Northwind sample, you get a bunch of XML (hooray). You’ll want to copy the URL in your browser window at this point.
Step 2: Create a new External Data Source
Back in your free developer edition, navigate to Setup > Develop > External Data Sources, and fill in the form as shown in the image. In the Server URL, paste the .. er … server URL you just copied above.
Important: once you click “Save” you then need to click the button that says “Validate and Sync” before you can move on.
Once that’s complete, you will be able to select the specific object you’re interested in. For this example, select “Categories” and click on “Sync”.
After a moment, you will return to the external data source screen and your external objects related list will look like this — sweet!
Step 3: Create a Tab for the External Object
If you click on the “Categories” label in external objects related list, you’re going to see an object definition screen that looks shockingly familiar. Yes, it even includes a “Page Layout” section at the bottom.
Adding this to a tab is super easy. Navigate to Setup > Create > Tabs, and create a new tab for a custom object. That’s it! Now you can easily navigate to particular records, work with list views, etc — all of the stuff you can easily do with custom objects.
Step 4: Do a SOQL Query
If you’re like me, you are by now fairly curious about accessing the data in Apex and in a standard SOQL query. Head on over to Workbench. When you login, be sure to login using v32.0. Jump to SOQL queries, and select the “Categories__x” object.
And in the .. er … category of least surprising thing ever, you can see it works!
But what about Apex you say? Yes, also just that easy, as you can demonstrate for yourself using Workbench’s Apex Execute utility.
Give it a shot and let me know what you think. @ReidCarlberg