Custom edit forms breaking if workflows or custom event receivers/handlers are attached.

November 9th, 2008 § 1 Comment

This has been documented elsewhere, but just in case you missed it…

Scenario: You have a custom editform.aspx where you made it all snazzy looking and then you decide to add a custom workflow or event handler to the list to handle data validation or business logic. When you try to submit updates you get a nasty error that looks like this:

The data source control failed to execute the update command.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Microsoft.SharePoint.WebPartPages.DataFormWebPartException: The data source control failed to execute the update command.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[DataFormWebPartException: The data source control failed to execute the update command.]

Microsoft.SharePoint.WebPartPages.DataFormWebPart.UpdateCallback(Int32 affectedRecords, Exception ex) +170

System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback) +4434003

Microsoft.SharePoint.WebPartPages.DataFormWebPart.FlatCommit() +724

Microsoft.SharePoint.WebPartPages.DataFormWebPart.PerformCommit() +92

Microsoft.SharePoint.WebPartPages.DataFormWebPart.HandleOnSave(Object sender, EventArgs e) +61

Microsoft.SharePoint.WebControls.SaveButton.OnBubbleEvent(Object source, EventArgs e) +1906

System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +50

System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +39

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +321

Solution: Even though my server had the SP1 and the Infrastructure Update, I was still getting this error. Luckily, there’s a hotfix from March 2008 for this issue – http://support.microsoft.com/kb/949749

Advertisement

§ One Response to Custom edit forms breaking if workflows or custom event receivers/handlers are attached.

  • George says:

    Um….is this what you do with all your free time? Where are the pictures?? It sounds like we need another taco Tuesday so we can catch up…Miss you!

Leave a Reply

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

Gravatar
WordPress.com Logo

Please log in to WordPress.com to post a comment to your blog.

Twitter picture

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

Facebook photo

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

Connecting to %s

What’s this?

You are currently reading Custom edit forms breaking if workflows or custom event receivers/handlers are attached. at The SharePoint Swiss Army Knife.

meta

Follow

Get every new post delivered to your Inbox.

Join 584 other followers