SharePoint Evil #3: Can’t view BCS External List: Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator.

A SharePoint Evil is an issue/error that is so ambiguous and misleading that Google will shows 50 hits, with 10 different suggested solutions, and none of them work for your particular case. (So the described below may not work for you – but I hope it will).

When viewing an External List you get the error message below:

Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator.

Correlation ID:379c329f-ecab-47cc-8983-bc9fe94e55b6

In my case it was because of an error in the TypeDescriptors of my entity’s methods. A TypeDescriptor of the returnParameter of the ReadList method was meant to map to the Identifier, but it was not. It was set to (none).

My entity looks like below, with the Identifier being CustomerID.

Entity Model

The returnParameter for my ReadList method looks like below.

Method Details

Setting the Identifier of the CustomerID TypeDescriptor and redeploying the external content type fixed the issue.

Update: You also get this error if the property names of the C# entity class do not match up to the name of the TypeDescriptors. So in the screenshot above, the C# entity class must have a property called CustomerID. If I named it ID for instance, then I will get this error.

Advertisement

About Bernado

Based in Australia, I am a freelance SharePoint and Dynamics CRM developer. I love developing innovative solutions that address business and everyday problems. Feel free to contact me if you think I can help you with your SharePoint or CRM implementation.
This entry was posted in BCS, SharePoint 2010, SharePoint Evils. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s