WEBSITE

Sharepoint 2010 : Composite Applications with Business Connectivity Services - Getting Started with BCS (part 1) - Creating an External Content Type

12/7/2013 2:59:28 AM

What better way to discover what Business Connectivity Services is about than to dive straight in and create a sample application? For this example, we are going to connect to the Customers table in the Northwind database and use it to create a SharePoint external list. When we have our customer list in SharePoint, we will create an external column for our document library and then use all we know to build a composite application.

For our solution we need to

  • Connect to the Northwind database.

  • Define an External Content Type.

  • Create an external list in our SharePoint site.

  • Create an External Column for our document library.

All of these tasks will be done from SharePoint Designer, so without further ado, let’s open SharePoint Designer and point it at our sample SharePoint site.

1. Creating an External Content Type

From the Site Objects list in SharePoint Designer, you can see an External Content Types option. Selecting this allows us to create a new External Content Type using the icon in the ribbon.

Figure 1 shows all the elements that make up our new External Content Type including general information such as name and office type (Generic List, Appointment, Task, and Post), operations, permissions, associated external lists, and fields.

Figure 1. The new External Content Type page displays general information as well as permissions, operations, fields, and associated external lists

After naming the Content Type we now need to connect it to our external data source by clicking the link next to the External System label. This opens the Operation Designer page as in Figure 1.

Note

The external data source in this example is a SQL database, but SharePoint Designer 2010 provides for connections to a Web service as well as a .NET assembly.


The Operation Designer page in Figure 2 shows the page with our database connected. Creating the connection was as easy as clicking the Add Connection button and providing the database server, name, and credentials. You can see the list of tables in our database in the Data Source Explorer. Now that we have located our Customers table, we have to define the operations that will allow us to interact with the data. Right-clicking the Customers table allows us to select from all the operations available (Figure 3).

Figure 2. The Operation Designer allows you to define and search external connections

Figure 3. The Operation Designer allows you to select from several operations to define for your data source


The first option allows us to define all the operations at once. Selecting this option prompts a wizard that enables us to define parameters and filters. We are doing a simple one-to-one mapping of a table, so we don’t need to apply filters. Figure 4 shows the Parameters page where we can select the fields we want to pull from our data source as well as field properties, such as display name, if the field is read-only, and so on.

Figure 4. The Parameters Configuration page allows you to select the fields to connect with and to define various properties for those fields

You may also notice the Office Property option under properties. This allows you to map your inbound columns to Office type properties such as first name, e-mail address, home phone number, and so on. The reason you may want to do this is if you are creating a Content Type using one of the Office types such as contact, task, or other. Having these Content Types makes integration with the Office clients incredibly easy.

After the wizard is complete, you will have a full set of operations defined for your data. Figure 5 shows us returning to our External Content Type summary page where can see the fields we selected and the operations we defined.

Figure 5. The External Content Type summary page after operations have been defined

 

We have our External Content Type connected to our external data source, fields selected, and operations defined. We are ready to save the Content Type and put it to use.

Other  
  •  Sharepoint 2010 : Composite Applications with Business Connectivity Services - BCS Components
  •  Sharepoint 2013 : Overview of Windows Azure for Sharepoint (part 5) - DEVELOPING WINDOWS AZURE APPLICATIONS - Creating a Model
  •  Sharepoint 2013 : Overview of Windows Azure for Sharepoint (part 4) - DEVELOPING WINDOWS AZURE APPLICATIONS - Creating Your First Windows Azure Application
  •  Sharepoint 2013 : Overview of Windows Azure for Sharepoint (part 3) - DEVELOPING WINDOWS AZURE APPLICATIONS - Setting Up Your Development Environment
  •  Sharepoint 2013 : Overview of Windows Azure for Sharepoint (part 2) - WINDOWS AZURE PLATFORM
  •  Sharepoint 2013 : Overview of Windows Azure for Sharepoint (part 1) - DEFINING THE CLOUD, DEFINING WINDOWS AZURE
  •  Windows Small Business Server 2011 : Customizing a SharePoint Site - Customizing Companyweb (part 5) - Adding RemoteApps Links - Add the Web Part to Companyweb
  •  Windows Small Business Server 2011 : Customizing a SharePoint Site - Customizing Companyweb (part 4) - Adding RemoteApps Links - Register the Web Part as Safe
  •  Windows Small Business Server 2011 : Customizing a SharePoint Site - Customizing Companyweb (part 3) - Adding RemoteApps Links - Configure RD Web Access
  •  Windows Small Business Server 2011 : Customizing a SharePoint Site - Customizing Companyweb (part 2) - Adding RemoteApps Links - Add the RD Web Access Role Service
  •  
    Video
    Top 10
    SG50 Ferrari F12berlinetta : Prancing Horse for Lion City's 50th
    The latest Audi TT : New angles for TT
    Era of million-dollar luxury cars
    Game Review : Hearthstone - Blackrock Mountain
    Game Review : Battlefield Hardline
    Google Chromecast
    Keyboards for Apple iPad Air 2 (part 3) - Logitech Ultrathin Keyboard Cover for iPad Air 2
    Keyboards for Apple iPad Air 2 (part 2) - Zagg Slim Book for iPad Air 2
    Keyboards for Apple iPad Air 2 (part 1) - Belkin Qode Ultimate Pro Keyboard Case for iPad Air 2
    Michael Kors Designs Stylish Tech Products for Women
    REVIEW
    - First look: Apple Watch

    - 3 Tips for Maintaining Your Cell Phone Battery (part 1)

    - 3 Tips for Maintaining Your Cell Phone Battery (part 2)
    Popular Tags
    Video Tutorail Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Exchange Server Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe Photoshop CorelDRAW X5 CorelDraw 10 windows Phone 7 windows Phone 8 Iphone