>

Part 2: SharePoint 2013 Business Connectivity Services, Search and Profile Page Demo

7 MIN READ

01/22/2014
Part 2: SharePoint 2013 Business Connectivity Services, Search and Profile Page Demo

Back to Part 1

Create the External Content Type

External Content Types are similar to regular content types in that they contain several fields that make up that particular content type. The main difference is that these fields are mapped to columns in the SQL database in this case. We are only going to be performing read operations for the purposes of search, but you could easily add write operations if you wanted to treat this like a regular SharePoint list. There are a lot of limitations though if you do, like no workflows, version history, folders etc.

We will be performing the following actions:

1. Create a new External Content Type
2. Create a new data connection
3. Create Read Item Operations
4. Create Read List Operations

Create a New External Content Type

In order to map the data, we want to SharePoint we now have to open up SharePoint Designer 2013.

1-Open-Site-Collection (1)

Open the Site Collection you want to house the External Content Type Profiles

Create the External Content Type

2-New-External-Content-Type

Click on “External Content Types”

 

3-External-Content-Type

 

Click to Create a “New External Content Type”


Create a New Data Connection

 

4-New-Data-Connection

Enter a name and display name for the new external content type we are creating then click “Click here to discover external data sources and define operations.

 

5-Add-SQL-Connection

Click on “Add Connection”

6-Source-SQL-Server

We want to connect to “SQL Server”

7-SQL-Connection-Properties

Enter the name of your SQL server and the name of the database. Since we created a Windows account for our target application we will want to select that here. Enter the name of the Application we created in the Secure Store Service.

8-SQL-Authentication

Here you can enter in your own credentials assuming they are a member of the secure store application.

 

9-SQL-Views

Now you can review your data source. In the AdventureWorks sample, we have several views already created for us.


Create A Read Item Operation

10-Create-Read-Item-Operation

Right click on “vProductAndDescription”

 

11-Select-Read-Operation

Click “New Read Item Operation”. We will only be created this operation since we only gave read access to the database and we want to return individual items and not a list.

12-Read-Item-Operation-Properties

I like to rename all my operations and fields to make it easier to find in SharePoint’s Search Schema.  There are no errors so let's go ahead and click "Next".

13-Read-Item-Input-Parameters

Here we need to select a unique value.  So let's pick ProductID since that will be unique to each item.  Rename the field and if there are no errors click next.

14-Read-Item-Return-Parameter-Config

Now map each field to a new one in SharePoint and click Finish. The warning message does not apply in this scenario since we are performing read-only operations.

15-Read-Item-Operation-on-View

Now Right Click on vProductModelCatalogDescription and click “New Read Item Operation” This is the operation that we will be displayed in our search results and profile pages.

16-Rename-Operation

Rename the operation and click “Next”

17-Input-Parameters

Map the ProductModelID to an Identifier.

18-Return-Parameters

Map all of the fields and prepend “AdventureWorksModel” for organizational purposes.

19-View-Created-Operations


 

Create a new Read List Operation

For this step, we are just going to go through the same steps as before to create the read list operations. The read list operation is necessary for the crawler to be able to crawl each particular item in the view. The main difference is that SharePoint recommends a filter to limit the number of items returned.

20-Operations-Design-View

Now click back on “Operations Design View”

Right click on “vProductModelCatalogDescription” and select “New Read List Operation”

21-Filter-Parameters-Configuration

Because we do not have very many items we can proceed without adding a filter.

Now you can save everything and move back to Central Administration.


Configure the Business Data Connectivity Service

Here we will be creating the profile page for the items in the database as well as managing the permissions for both users and the search crawler. This is an important step often missed, leading to several authentication errors in the search crawl.

The steps for this actions are:

1. Create the Profile Page
2. Configure Object and Metadata Store Permissions

Create the Profile Page

 

22-Configure-BDC

Click “Business Data Connectivity Service”

23-Configure-BCS-Ribbon

Click on “Configure”

24-Profile-Site-Page

Enter the site we created to house the external content type profile pages.

25-Create-Profile-Page

Click on the dropdown for the external content type we created “AdventureWorksModel” and select “Create/Upgrade Profile Page”

26-Iframe-Error

Click “Open Content in a new window” This occurs because we are trying to open up a different location in the modal.

27-Profile-Page-OK

Click “OK”

28-Shoudlnt-Take-Long

We will see the gray “This Shouldn’t take long” page.

When it is done click “OK” again


 

Configure Object and Metadata Store Permissions

29-Set-Metadata-Store-Permission

Click Set Metadata Store Permissions

30-Set-Execute-Premissions

Select Execute for All Users

31-Admin-Permissions

Select all permissions for your admin user

32-Set-Object-Permissions

Do the same for “Set Object Permissions”, which for some reason doesn’t have an inheritance from the Metadata Store.

Part 3 will cover more on Search.