Archive for August 9, 2013

External Content Type Walkthrough

Looking to design your own external content type and deploy it as part of a SharePoint solution? Read on for a walkthrough on how to create one.

First up, the steps are the same for SharePoint 2010 and 2013 and have been carried out using Visual Studio 2012. Visual Studio 2010 will also work.

Before I start the walkthrough, I’ll summarise the goal of this post:

We have a very simple database that contains a couple of tables – Customer and Order. An external content type will be created and via a view on the database, will return a list of customers and their orders. The external content type will only allow read access to this information.


  • There is a Business Data Connectivity service up and running on the SharePoint farm for the External Content Type (ECT) to be deployed to.
  • The user deploying the solutions containing the ECT, in this case the user running Visual Studio, has adequate permissions to create it in the application service.
  • This is just a demonstration, so there will be a distinct lack of logging, error handling and bad practices such as storing database credentials in plain text within the code, try to ignore this 🙂

Read more

NullReferenceException using AssetUrlSelector

If you’ve been using the AssetUrlSelector for SharePoint the following may help if you’ve recently started getting the following error in the ULS logs and are not able to view list items.

Error while executing web part: System.NullReferenceException: Object reference not set to an instance of an object.

The cause of this error is likely due to a recent update applied to the server. The most likely candidate is the recent KB update – 2844287MS13-052: Description of the security update for the .NET Framework 2.0 Service Pack 2 on Windows Vista Service Pack 2 and Windows Server 2008 Service Pack 2: July 9, 2013

Microsoft have recently released a hotfix for this issue (and a few others). The hotfix can be downloaded from the Microsoft site here.

I can confirm that after applying this hotfix, the assert URL selector dialog displayed list items without generating an error.


Get every new post delivered to your Inbox

Join other followers: