Unable to display this web part - SharePoint 2010 BDC

535 views Asked by At

First time developing an External List in SharePoint 2010 using BDC.

When I debug and step through the code, I can see I'm getting data. I'm even limiting the results with a Linq to SQL query to 20 items. I can see I get 20 items returned by the query.

The problem is when I try to view the external list while I'm debugging, it throws a "Web part could not be displayed" error. I've searched the SharePoint logs for the associated GUID, and the error I find mentions the default filter could cause performance issues.

I think that error has to be bogus - I'm only returning 20 items, so SharePoint should display my list.

Any advice on debugging this problem? I've been Googling the issue, but this error is so generic it could mean just about anything.

Update

I've followed the steps listed in this microsoft tutorial. I've deleted my code and re-created it several times, and I know I haven't missed any steps in the tutorial.

1

There are 1 answers

0
Nadeeja Bomiriya On

When debugging BDC SharePoint project I usually follow below steps.

  1. Build and deploy BDC Project
  2. Create a External List instance manually if not already done by the BDC Solution
  3. Make sure "All Authenticated Users" have all access (This is done in Central Admin)
  4. Create an Empty SharePoint project in the same solution (let's say SPDebug).
  5. Build and debug SPDebug project.
  6. Put a breakpoint on BDC Project code (i.e. Inside ReadItem())
  7. Go to List and select list instance

Advantage of having a separate project for debugging is you don't loose any configuration you have already done to the SharePoint site.