I have created an External Content Type in my Sharepoint 2010 installation that gets its data through a WCF Service from a remote database. I have implemented all the CRUD operations without issue.

I have created a list instance in Visual Studio 2010 and I have added a custom newform to the instance so when a user selects New Item while browsing the list my custom form is the one used. This works well. However when a user inputs data for a new item and presses Save I need to be able to return to the user any errors that might arise from the external system.

I can't figure out how to get an event or handle to the BDCModel in my code behind of my custom form that will allow me to post back an error if for instance the WCF Service times out or the remote database is not available for some reason.

Governance has declared that we are not allowed to use the Sharepoint Designer or InfoPath forms to I have to do this in Visual Studio.

Can anyone point out tutorials for intercepting errors returned from BDCModel Create and Update methods and posting them back to the user through the code behind of my custom form or do I have to implement the entire save procedure myself with a totally custom form that overrides the Save?

I would rather not have to do that. I have also been told that I cannot use a custom webpart to implement this with the client object model unless there is absolutely no way to solve this using the OOTB external list and custom forms.

1 Answer 1


Our only option was to create a base class for our custom forms to inherit from. Then we overrode the page error event and when we recieve an error back from a service call I simply redirect the page back to itself and append the errormessage to the query string.

When the page loads if the errormessage is present I place the string into a label that I have added to all the custom CRUD pages. Not elegant, but it works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.