How to search the data from the associated external content type in SharePoint 2010

In this article we will be seeing how to search the data from the associated external content type.

SQL database details


Database name BCS

Table 1. Department_Details

Department details

Table 2. Employee_Details

Employee details

Association

Emploee_Details and Department_Details are associated as shown in the following

Both employee and department details

Create associated ECT's


External content type department

  • Open SharePoint Designer 2010
  • Click on Open Site
  • Open share point
  • Enter the site URL and click on Open
  • Go to Navigation => External Content Types => New => External Content Type
    External content types
  • Enter the details as shown in the following
    Generic list
  • Click on the link "Click here to discover external data sources and define operations"
  • Click on "Add Connection"
  • In the External Data Source Type selections select "SQL Server" and click on Ok
    External data source type selection
  • Enter the details as shown in the following
    SQL server connection
  • Right click on Department_Details and click on "Create all operations"
    Add connection
  • Click Finish
    Operation properties
  • Save the external content type

External content type employee

  • Go to Navigation => External Content Types => New => External Content Type
    File
  • Enter the details as shown in the following.
    External content type information
  • Click on the link "Click here to discover external data sources and define operations".
  • Click on "Add Connection".
  • In the External Data Source Type selections select "SQL Server" and click on Ok
    Data source type
  • Enter the details as shown in the following
    Database name
  • Right click on Department_Details and click on "Create all operations"
    Create all operation-15
  • All operations wizard will pop up, Click Finish.
  • Right click on Department_Details and click on "New Association".
  • Association wizard will pop up.
  • Click on browse and select "Department".
  • Click on Ok.
  • In the Field select DeptID as shown in the following
    Association properties
  • Click on Next and Map the DeptID to Identifier
    Input parameter configuration
  • Click on Next.
  • Click on Finish and you could see the following operations for the External content type
    External content type operations
  • Save the external content type.

Creating profile page

  • Go to Central Administration => Application management => Manage service applications =>Business data connectivity services.
  • In the "Profile Pages" group in the ribbon, click on Configure.
    Profile page
  • Select the "Enable Profile Page Creation" and enter the URL of the profile site( I have created a new site using "Team Site" template and I am referring that URL)
    Configure external content type profie page host
  • In the "Profile Pages" group in the ribbon, click on Create/Upgrade.
    Profile page
  • "Create/Upgrade Profile Pages" wizard will pop up, click on Ok
    Create or upgrade profile page
  • A new Profile page will be created successfully
    Create successfully

Crawling and searching the associated external content type


Steps Involved

Search for data from the associated external content type

  • Go to the root site and if you see by default in the search scope dropdown list BCS Association will be selected
    BCS association
  • Enter a search term that will return the result from the external content type
    Employee
  • Click on the search result link you will be redirected to the profile page
    Empid-25-.jpg
  • Master/Detail Association
    Bccs association moss
    Department