Share-n-dipity

SharePoint serendipity is the effect by which one accidentally discovers something fortunate, especially while looking for something else entirely. In this case, it is the occassional musings, observations, and Ouija board readings about the phabulously

Oh No - Your BCS Model Doesn't Show Up When You Create a Content Source For BDC

Oh No - Your BCS Model Doesn't Show Up When You Create a Content Source For BDC

  • Comments 2
  • Likes

First let me point out that I gratuitously co-mingled the terms "BCS" and "BDC" in the title because I honestly never know what to call this anymore (I've heard the marketing language before but it just ain't stickin').  So...today's post is something that I thought I had added to the blog before, but searching the site is rendering no results so here we are with a new post - hopefully the first on this topic.  Event today have led me to believe that my gray matter may be a bit off.  So here's the scenario:

You create a new BCS model; for example, you create a SharePoint App, and then create an ECT on top of it that you can use with your App or as an External Content Type for an External List (kind of along the lines I described here: http://blogs.technet.com/b/speschka/archive/2014/01/06/setting-up-bcs-hybrid-features-end-to-end-in-sharepoint-2013.aspx).  Now you go into the Search Service application and create a new content source so you can crawl it (because we won't index an external list, since the content is rendered asynchronously).  You select the "Line of Business Data" content type, and then you get a message that says "There are no external data sources to choose from." (please tell me some search engine will index that phrase)  Confusing as heck, because you can create an External List from your ECT and get data back, so it should work just great, right?

In the interest of avoiding sarcasm in response to my rhetorical question, let me just say "no".  To be able to add it to a search content source, you need to add the following properties:

1. <Property Name="ShowInSearchUI" Type="System.String"></Property>  - to the <LobSystemInstances><LobSystemInstance><Properties> section.  This is near the top of the Xml.
2. <Property Name="RootFinder" Type="System.String"></Property> - to the properties for the Method that is used to read all items for the list.  By default it will be called “ReadAll{entityName}”, where “{entityName}” is the name of the table, like “Customers”.
3. <Property Name="RootFinder" Type="System.String"></Property> - to the properties for the MethodInstance that implements the method in #2; by default it will have the same name as #2.  You can also find this by searching for Type="Finder" Default="true" in your Xml.

Now, you DO NOT need to add an actual value to these properties when you plug them into your ECT; they are like flags, so they infer a value just by being present.  Once you've made these changes to your model you'll need to delete the existing model and external content type (both done in the BDC / BCS admin page), then import your ECT again.  After you do that, your external list(s) that used it before should still work, and when you go into create a new content source in Search it should show up there as well.  Once you get that set up, remember to check the advice in this blog post to finish setting up the content source: http://blogs.technet.com/b/speschka/archive/2013/02/04/resolving-the-directory-links-across-partitions-are-not-allowed-error-when-crawling-odata-bdc-sources.aspx.

Comments
  • I have all these things present and yet I still dont see the DBC listed int he content sources page.

  • It worked like a champ,
    Many Thanks for the detailed description

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment