SharePoint24x7 It's all about SharePoint.

16Apr/110

Article – Business Connectivity Services (BCS) Part IV – Creating an External List

Last article demonstrated how to create an External Content Type (ECT) using SharePoint Designer 2010 and set various options such as Limit Filter and Wildcards.

In this section, we will use the same ECT we created earlier and combine it with External List concept to surface the Employee data coming from the LOB system.

There are multiple ways of creating an External List and connecting it with an existing ECT to surface data within SharePoint. I will discuss the 02 most popular mechanisms.

Creating an External List using SharePoint Designer 2010

This is the easiest way in which you can create an External List and connect it with an ECT at the same time. Let's create an External List using SharePoint Designer 2010.

Exercise 1 – Open an existing ECT

Let's open the NorthwindEmployees ECT we created last time.

  1. Fire-up SharePoint Designer 2010 by navigating to Start -> All Programs -> SharePoint -> Microsoft SharePoint Designer 2010.
  2. Click Open Site to bring up Open Site dialog box.
  3. Enter the URL of the SharePoint site we created the ECT for Site name: and click Open.
  4. Select the External Content Types from the Site Objects pane and wait until it retrieves all the existing External Content Types. After a few seconds, you will see the ECT we created last time.

    NorthwindEmployees ECT

    NorthwindEmployees ECT

  5. Click the NorthwindEmployees ECT from the right-hand side External Content Types pane to open the ECT and its properties.

    ECT Summary Page

    ECT Summary Page

Exercise 2 – Creating an External List using SharePoint Designer 2010

  1. Observe the ribbon and its options for the ECT.
  2. From the Lists & Forms group in the ribbon click Create Lists & Forms button.

    Ribbon for ECT

    Ribbon for ECT

  3. Create Lists & Forms for Northwind Employees dialog box will show up for you to configure the new External List. Provide a name for the new External List by filing List Name: field. I provided "Employees List" for this example.
  4. Optionally you can select Create InfoPath Forms check-box to generate InfoPath for all the list view pages (Read List.aspx, DispForm.aspx, etc…) instead of creating ASP.NET pages.

    Creating the External List

    Creating the External List

  5. Click OK to create the External List. After few seconds, you will see the section External Lists in the ECT summary page with the new External List we created.

    Creating the External List

    Creating the External List

Creating an External List using Web Browser

This way we can create the External List by using standard web browser application and using options in the SharePoint site.

  1. Open your web browser and navigate to the SharePoint site which we created the ECT.
  2. Select Site Actions -> More Options… to open Create dialog box.
  3. Select the External List from the List Templates section and click Create button.

    Creating the External List

    Creating the External List

  4. Provide a name for the External List by filling Name: field. I provided "Northwind Staff" for this exercise.

    Creating the External List

    Creating the External List

  5. In the Data source configuration section, click "Select External Content Type" button to browse all the ECTs available in the current site collection.

    Select the ECT

    Select the ECT

  6. Select the Northwind Employees ECT from the External Content Type Picker dialog box and click OK.

    Browse for the ECT

    Browse for the ECT

  7. Now you will see that Data source configuration is filled with the ECT information automatically and click Create button to create the External List.

    Creating the External List

    Creating the External List

View LOB data using the External List

Now that we have created an External List, or may be 02 if you tried both the options, it's time to look at the way it surfaces external data within SharePoint. It's very easy to do that.

  1. From the Quick Launch, select the name of the list you created.
  2. Try viewing individual Employee items, updating Employee records, deleting Employees records and inserting new Employee records using SharePoint External List.
External Data coming through the ECT & External List

External Data coming through the ECT & External List

Displaying an item with InfoPath Form

Displaying an item with InfoPath Form

Editing an item with InfoPath Form

Editing an item with InfoPath Form

Inserting a new item with InfoPath Form

Inserting a new item with InfoPath Form

Posted by Joy