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


1.gif

Table 2:Employee_Details

2.gif

Association:

Emploee_Details and Department_Details are associated as shown in the following:

3.gif

Create Associated ECT's:

External Content Type: Department

  • Open SharePoint Designer 2010.
  • Click on Open Site.

    4.gif
     
  • Enter the site URL and click on Open.
  • Go to Navigation => External Content Types => New => External Content Type.

    5.gif
     
  • Enter the details as shown in the following.

    6.gif
     
  • 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.

    7.gif
     
  • Enter the details as shown in the following.

    8.gif
     
  • Right click on Department_Details and click on "Create all operations".

    9.gif
     
  • Click Finish.

    10.gif
     
  • Save the external content type.

External Content Type: Employee

  • Go to Navigation => External Content Types => New => External Content Type.

    11.gif
     
  • Enter the details as shown in the following.

    12.gif
     
  • 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.

    13.gif
     
  • Enter the details as shown in the following.

    14.gif
     
  • Right click on Department_Details and click on "Create all operations".

    15.gif
     
  • 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.

    16.gif
     
  • Click on Next and Map the DeptID to Identifier.

    17.gif
     
  • Click on Next.
  • Click on Finish and you could see the following operations for the External content type.

    18.gif
     
  • 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.

    19.gif
     
  • 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).

    20.gif

     
  • In the "Profile Pages" group in the ribbon, click on Create/Upgrade.

    21.gif
     
  • "Create/Upgrade Profile Pages" wizard will pop up, click on Ok.

    22.gif
     
  • A new Profile page will be created successfully.

    23.gif

Crawling and searching the associated external content type:

Steps Involved:

Search for a 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.

    24.gif
     
  • Enter a search term that will return the result from the external content type.

    25.gif
     
  • Click on the search result link you will be redirected to the profile page.

    26.gif
     
  • Master/Detail Association:

    27.gif

    28.gif


Up Next
    Ebook Download
    View all
    Learn
    View all