Question

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.

Était-ce utile?

La solution

It's permissions (it's always permissions) - the backend user (likely the App Pool Account) doesn't have permissions - check the System Application event log then check the Security log. The SharePoint ULS log might help as well.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top