With Business Connectivity Services (BCS) in SharePoint 2010, you are able to use Microsoft SharePoint 2010 Search software to connect to external data, such as your Microsoft Dynamics CRM 2011 database, Microsoft Dynamics GP 2010 database, or staffing software. BCS is software that is able to index your external data using what is called an External Content Type (ECT).

In this example, I have created a Microsoft Dynamics CRM 2011 sandbox test environment to demonstrate how you can use Microsoft SharePoint 2010 Search to quickly and easily find your accounts using a single Microsoft SharePoint 2010 web page. While I will only be showing you how to setup a search on your Account entity in Microsoft Dynamics CRM 2011 as an effort to keep this example simple, the true power with the BCS search really shines when you combine multiple entities and even multiple software databases, such as Microsoft Dynamics CRM 2011, staffing software, and Microsoft Dynamics GP 2010. How to search on multiple associated entities will be discussed in a later blog post.

Before we begin, I recommend that you familiarize yourself with Microsoft Dynamics CRM 2011, its database structure, and Microsoft SharePoint 2010. I will not be mentioning any of the finer details such as security. There are other essential details to consider when implementing in a live production environment that are not being mentioned here. And, as always, if you are doing this in a live production environment, please take complete backups of everything before proceeding. I always recommend working in a test environment first.

Step 1: Create a Search Results Site for your Business Connectivity Services

This step will create a host site in Microsoft SharePoint 2010 that will contain the detailed pages for all of your search results of a particular ECT to link to. Without this Microsoft SharePoint 2010 site, your ECT search results will contain a useless link.

  1. Open your Microsoft SharePoint 2010 home page in Microsoft Internet Explorer.
  2. On the Site Actions drop down, select New Site.
  3. Select Blank Site and click More Options.
  4. In the Title field, type “Search Results”. (Do not include the quotations. This can also be any name you want to give it.)
  5. In the URL name field, type “SearchResults”.
  6. Under Navigation, select No for both options. (Because this site is only used for your ECT search results, there is no need to directly navigate to it from your home page in SharePoint.)
  7. Leave everything else as default.
  8. Click Create.

Step 2: Configure External Content Type Profile Page Host

This step will allow BCS ECT to connect to the Microsoft SharePoint 2010 Search Results site we just created.

  1. Start Microsoft SharePoint 2010 Central Administration. Figure 1: Microsoft SharePoint 2010 Central Administration
  2. Under Application Management, click Manage Service Applications. Figure 2: Manage Service Applications
     
  3. Under Name, click Business Data Connectivity Service.
  4. Click Configure in the ribbon.
    Figure 3: Configure External Content Type Profile Page Host
  5. Type in your Host SharePoint site URL for the Search Results site we created.
  6. Click OK.
  7. Click Set Metadata Store Permissions in the ribbon.
  8. Type the name of the account you will be using and click Add.

    Figure 4: Set Metadata Store Permissions
  9. Check all the boxes next to Edit, Execute, Selectable In Clients, Set Permissions, and Propagate permissions to all BDC Models, External Systems and External Content Types in the BDC Metadata Store. Doing so will overwrite existing permissions.
  10. Click OK.

Step 3: Create a Microsoft SharePoint 2010 Basic Search Site

This step will create the Microsoft SharePoint 2010 site you will be using to do all of your searching. Since we are using it primarily for Microsoft Dynamics CRM 2011, feel free to make it an iframe within a custom Dashboard in Microsoft Dynamics CRM 2011.

  1. Open your SharePoint home page in Internet Explorer.
  2. On the Site Actions drop down, select New Site.
  3. Select Basic Search Center.
  4. In the Title field, type “CRM Search”. (Do not include the quotations. This can also be any name you want to give it.)
  5. In the URL name field, type “CRMSearch”.
  6. Click Create.

Step 4: Create an External Content Type

This step will create the connection between Microsoft SharePoint 2010 Search and the Microsoft Dynamics CRM 2011 software database. This is determining what is searched, how it will be searched, and what search results you will receive.

  1. On the Site Actions drop down, select Edit in SharePoint Designer.
    Figure 5: Site Objects External Content Types
  2. In the Navigation pane under Site Objects, click on External Content Types.
  3. Click on External Content Type in the ribbon.
  4. Click on New external content type.
  5. Type “Account” and press Tab.

    Figure 6: External Content Type Information
  6. Click on Click here to discover external data sources and define operations.
  7. Click on Add Connection.
  8. In the Data Source Type drop down, select SQL Server and click OK.
  9. Type in the name of your Database Server and Database Name.

    Figure 6: SQL Server Connection
  10. Click OK.
  11. Expand the CRM Data Source you just created.
  12. Expand the Viewsfolder.

    Figure 7: Data Source Operations
  13. Right click on Account and click on New Read Item Operation.
  14. Click Next.
  15. Scroll down until you see AccountID and select it.
  16. On the right side under Properties, check the Map to Identifier: box.
  17. Click Next.
  18. At the top, under Return Parameter Configuration, uncheck the Data Source Elements box.
  19. Scroll down until you see AccountID and select it.
  20. On the right side under Properties, check the Map to Identifier: box.
  21. Scroll down until you see Name and check the box next to it.
  22. Click Finish.
  23. Right click on Account and click on New Read List Operation.
  24. Click Next twice.
  25. At the top, under Return Parameter Configuration, uncheck the Data Source Elements box.
  26. Scroll down until you see AccountID and select it.
  27. On the right side under Properties, check the Map to Identifier: box.
  28. Scroll down until you see Name and check the box next to it.
  29. Click Finish.
  30. Click on Summary View in the ribbon.
  31. Under Fields, select Name and click on Set as Title in the ribbon.


    Figure 8: External Content Type Information and Permissions
  32. Right click on the tab you are working in and select Save.
  33. Click on Create Profile Page in the ribbon.

Step 5: Crawling Microsoft Dynamics CRM 2011 Software Database

This step will crawl and index your Microsoft Dynamics CRM 2011 software database. Here you are also able to set a schedule for incremental crawls on your software database to ensure that all of your searches and search results are up to date.

  1. Start Microsoft SharePoint 2010 Central Administration.

    Figure 9:
    Microsoft SharePoint 2010 Central Administration
  2. Under Application Management, click Manage service applications.

    Figure 10: Manage Service ApplicationsUnder Name, click Search Service Application.

    Figure 11: Search Service Application
  3. Click on the link to the right of Default content access account under System Status.

    Figure 12: Default Content Access Account
  4. Enter in the information for the account that will be used for crawling.
  5. Click OK.
  6. Under Crawling, click on Content Sources.
  7. Click on New Content Source.
  8. Type CRM in the Name field.
  9. Select Line of Business Data for Content Source Type.
  10. Select Crawl selected external data source and check the box next to CRM.
  11. Check the box next to Start full crawl of this content source.


    Figure 13: Content Source
  12. Note: This is where you can schedule Incremental Crawls to keep your search up to date.
  13. Click OK.
  14. When crawl is complete, the Status should be Idle. The crawl duration will vary depending on system performance and amount of data being crawled. Click Refresh until Status says Idle.
  15. You may now test your Microsoft SharePoint 2010 Search by heading back to the site you created and search for any of your Microsoft Dynamics CRM 2011 accounts.

Now that you have your BCS in Microsoft SharePoint 2010 Search finding all of your accounts in your Microsoft Dynamics CRM 2011 software database, you may be thinking this is great, but kind of limiting. If you recall me mentioning at the beginning of this blog, this is only the beginning of what you can do with BCS in Microsoft SharePoint 2010 Search.

You can use what you have learned here to search not only Microsoft Dynamics CRM 2011 accounts, but all of your Microsoft Dynamics CRM 2011 entities. You can even use this as a reference for creating a Microsoft SharePoint 2010 Search on your other software databases, like Microsoft Dynamics GP 2010 or your staffing software.

Let us use an example of how this can be applied. Because my experience is in staffing software, let us pretend there is a staffing company with the need to search for all of their contacts that are looking for jobs. This staffing company also needs to find all of their accounts that are actively looking for new employees. This search will allow the staffing company to search their staffing software for what they are looking for in one easy location.

In my next blog post, Associating Related Entities within Microsoft Dynamics CRM 2011 Software using Business Connectivity Services in SharePoint 2010 Search, I will demonstrate how to create a BCS associated ECT which will link your related Microsoft Dynamics CRM 2011 contacts to their account. This will allow for much more meaningful results to your searches.

Write A Comment