BCS and External List Learning – Part3

Check out previous posts on the same topic: Part1 Part2

Case where an external content type created did not show up in the external content type picker control.  This case was amazing as we (me and the customer) found the cause while on call!

The problem statement was simple! We create an external content type using SPD2010.  This time though we decide to implement not all the CRUD operation, but as an example just Create Item operation.  We saved the external content type to the BCS service application.  When we create an external list, this content type did not show up!

imageJust to visually represent what I am talking about, we can take a look at Screen1.

There’s an external content type defined that talks to SQL AdventureWorks database.  If we look at the “External Content Type Operations” section, we can see that only “Create” operation type is defined for this external content type.

Now, when we create an external list and try to make us of this content type, we would not be able to find it in there as shown in Screen2.

image

 

 

 

 

 

 

 

 

 

 

 

Now, since I only have this external content type in my BCS application, I see a message indicating that there are no external content types available.

The reason for this is that the interface that displaying the available external content types checks to see if the external content type implements “Read List” operation.  If there’s no “Read List” operation implemented, it doesn’t shown that external content type when it enumerates it.

Well literally, this isn’t like check for “Read List” implementation in the external content type and if it’s not there don’t show up the external content type in the picker UI.  But the underlying calls are made through WCF layer.  And finally, we end up checking if finder/specificfinder methods are implemented in the entities.  The specific method calls are “ValidateDefaultFindSpecificWithFinderExistence” and “ValidateFindSpecificExistence”.  As to how did I come about these, well, we all know of a tool called Reflector and the extremely helpful ULS logs.

Long story short, we need to have “Read List” operation implemented when we create our external content types via SPD2010 if we need our external content type to be enumerated and displayed by the external content type picker control.

Hope this was helpful! As always, stay tuned for more info on BCS and other bits and pieces of SharePoint 2010.