Salesforce Lightning Connect

This blog post is all about the new Lightning Connect Feature in Salesforce where I will be demonstrating its use.

Quick Overview

So what is Lightning Connect?

Simply, it is a feature that takes an external data source that uses the OData protocol and serves that data up inside Salesforce as external objects which are almost identical to native Salesforce objects. Currently the external objects are not available for reporting inside Salesforce or workflow, but other features such as global search, usage in APEX classes & Triggers, Custom Tabs and detail pages, SOQL, SOSL are available for external objects.

What is OData?

OData (Open Data Protocol) is a RESTful data access protocol that was originally defined by Microsoft and allows resources that are defined in a data modal and accessed via URLs to be consumed much like an RSS feed. OData has been adopted by several large enterprises such as IBM in their WebSphere offering and it is used by SAP to provide access to their Business Suite and Business Warehouse applications.

Lightning Connect Demo


The only thing you need for this part of the demo is a Salesforce developer org.

External Data Source Setup

To setup an external OData data source follow these basic instructions, and note in this demo we are going to use the free OData source Northwind.

  1. Click Setup > Develop > External Data Source
  2. Click New External Data Source
  3. Enter a Label value, e.g Northwind
  4. Select Lightning Connect: OData 2.0 as the Type
  5. Enter as the URL
  6. Keep the other fields as per the default and click Save

So there we have it, we have just connected an external data source to Salesforce, but before we add the external objects lets just look at some of the options available to us when we declare the data source.

High Data Volume: This looks like it bypasses some of the limit restrictions that Salesforce normally applies to make it easy when dealing with big data sets. Though the tooltip informs us that when this is turned on any external objects associated to this data source will not be available in Chatter or Salesforce1.

Compress Requests: When selected Salesforce will send compressed HTTP requests to the external server so you need to make sure that it is set up to receive gzip-compressed data.

Include in Salesforce Searches: Exactly what it sounds like, if this is selected then global search will include the external object tables, though it’s worth noting that only text, text area, and long text area fields are searched.

Custom Query Option for Salesforce Search: If the remote data service has implemented and exposed a free-text-search custom query option, enter the name of that query string parameter.

Format: This allows you to select either AtomPub or JSON as the OData format that the service uses.

Certificate: Allows you to force Salesforce to present a security certificate to the external server when establishing a connection.

Identity Type: Allows you to specify the identity type for authentication, default is Anonymous which is no authentication. If you select Per User then each user will be able to manage their own authentication settings in their personal settings, but only when permission to the external data source has been granted. Named Principal will use the same settings for any user who accesses the data source.

Authentication Protocol: Currently allows for OAuth 2.0 or Password Authentication.

Ok so now we have our external data source defined, we just need to sync the objects that we want to see inside Salesforce.

To do this click Validate and Sync on our new external data source details page.

You will see a list Tables, these are the resources that are being published by the Northwind data source. You can select any and as many as you want, with each selection being synced as an external object in Salesforce.

For the purpose of this demo please at least select Products and click Sync.

You should now see a list of external objects with Products being one of them. To explore this new external object just click on Products.


Hopefully this screen will excite you as much as it did me, the fact that this looks just like a native custom object is truly amazing and with so little effort involved in setting up the data source and syncing the tables it was clear to see how potentially powerful this feature was.

External Objects In Use

Let’s see how easy it is to add a custom tab for this new external object.

  1. Click Setup > Create > Tabs
  2. Click New on Custom Object Tabs
  3. Select Products
  4. Select a Tab Style
  5. Click Next
  6. Click Next
  7. Click Save

You will now see the Products tab has been added to your row of tabs, click to view it.

The initial view doesn’t show us very much so lets create a new view:

  1. Click Create New View
  2. Enter External Products for the view Name
  3. Select these fields to Display: ProductID, ProductName, UnitPrice, UnitsInStock, UnitsOnOrder
  4. Click Save


Hopefully by now you can see the potential for this feature and how easy it is to consume an OData external data source and serve up the tables as external objects inside Salesforce.

I urge you to try it for yourself and to call back for the next part of the blog where I will look at how we can use these external objects in APEX & Visualforce.

Useful Links

Leave a Reply

Your email address will not be published. Required fields are marked *