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
Table 2:Employee_Details
Association:
Emploee_Details and Department_Details are associated as shown in the following:
Create Associated ECT's:
External Content Type: Department
- Open SharePoint Designer 2010.
- Click on Open Site.
- Enter the site URL and click on Open.
- Go to Navigation => External Content Types => New => External Content Type.
- Enter the details as shown in the following.
- 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.
- Enter the details as shown in the following.
- Right click on Department_Details and click on "Create all operations".
- Click Finish.
- Save the external content type.
External Content Type: Employee
- Go to Navigation => External Content Types => New => External Content Type.
- Enter the details as shown in the following.
- 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.
- Enter the details as shown in the following.
- Right click on Department_Details and click on "Create all operations".
- 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.
- Click on Next and Map the DeptID to Identifier.
- Click on Next.
- Click on Finish and you could see the following operations for the External content type.
- 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.
- 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).
- In the "Profile Pages" group in the ribbon, click on Create/Upgrade.
- "Create/Upgrade Profile Pages" wizard will pop up, click on Ok.
- A new Profile page will be created successfully.
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.
- Enter a search term that will return the result from the external content type.
- Click on the search result link you will be redirected to the profile page.
- Master/Detail Association: