Another great feature for SharePoint 2010 is the ability to surface external Line Of Business (LOB) data, to be searched from within the SharePoint UI.
Case in point – a custom SQL Server database with a list of clients. This can be used within the standard SharePoint search – at least for a read-only look-up (initially – more complexity to follow)…
For BCS + Search, you need to do the following :
- Open SharePoint Designer
- Configure BCS external entity
- Configure the READITEM and READLIST methods
- Switch to Central Admin
- Configure a new Search Content Source
- Configure the Search Scopes
- And then – edit/update the display of search results, etc.
I’d found a GREAT post that covers this from end-to-end – but I’d had one slight problem with the crawl – was logging an ‘error’ – and got zero results in the under-lying scope.
The crawl was taking 5 minutes or more – so, it looks like it was scanning/viewing all data rows in the SQL Server table – but then ONE error at the end of the crawl.
The exact error was :
Error while crawling LOB contents.
EntityInstance retrieved using MethodInstance ‘PEOPLERead List’ of Method ‘PEOPLERead List’ has invalid type ‘System.Int32’ for field with name ‘ClientID’.
Expected type is ‘System.String’
** NB. “PEOPLERead List” is the name of the method (operation) within SharePoint Designer.
Unfortunately, there wasn’t much more information available – but, as a guess/hunch – I checked the configuration within SharePoint Designer.
It turns out, that the step to “Set As Title” – I’d chosen the field ClientID, which is actually an Int32 – and should have picked a “STRING” field.
Resolution :
- Back to SharePoint Designer
- Update the “Set As Title” to be the first text field (NameLast)
- Save the External Content Type
- Back to Central Admin
- Re-crawl the Content Source – and success !
Hope that helped you – if you were getting the same error….
** It would have been nice to know that the “SET AS TITLE” field must be a string – and can’t be an integer – not sure if that’s detailed or documented anywhere – and the error message above doesn’t tell the tale either.
*shrug*
Hi,
I am facing the same problem. I created an external content type and external list in sharepoint designer. I was getting the search results. Suddenly there was a crawl error saying
Error while crawling LOB contents. ( EntityInstance retrieved using MethodInstance ‘Read List’ of Method ‘Read List’ has invalid type ‘System.Int32’ for field with name ‘UID’. Expected type is ‘System.String’ )
I recreated the content source after changing the “set as title” to string from int.
Still I get the same error.
I created another external content type and external list referring to the same table in the database.
I have to get search results from this new list right? I donot see any results in the search page.
Please guide me. I am not getting how to go further.
Thanks.
LikeLike