InfoPath Error When Opening Form Template in Design Mode - SharePoint Development & Administration + InfoPath

Monday, April 12, 2010

InfoPath Error When Opening Form Template in Design Mode

I have an InfoPath form template with a large number of fields and groups in the main data source, as well as a large number of secondary submit and retrieve data connections. After making some changes to the form template, I was able to save (and publish) the updated version of the template. When trying to re-open the template in design mode, i recieve the following error:

"InfoPath has encountered an error. The operation failed."

I found that a blank form was able to be opened from the template which worked fine, but when trying to design the same tempate the "InfoPath has encountered an error. The operation failed." error was displayed. After pressing ok to the message, InfoPath opens without loading the required form in design mode.

The most recent change to the form template was the re-organisation of fields and groups in the form template's main data source. Sections on the form template were also bound to new groups and fields in the data source which I though might also have been the cause of the error. After working back through the incremental versions of the form template, the most recent version that was able to open had not yet had fields and groups in the data source removed or moved.

Moving fields around within the main data source dididn't seem to replicate the error, but removing groups did. After removing empty groups from the main data source and saving the form template, an "InfoPath has encountered an error. The operation failed." message is displayed when trying to open the form in design mode. The groups removed from the main data source were empty, and not bound to any controls on the form template.

Instead of removing the usused groups/fields from the main data source. I created a new group to store fields which are no longer in use. The unused and empty fields/groups were then moved into the new group, allowing the main data source to be tidied up without removing elements which can cause the form to become corrupt.

After searching for some information to shed some light on this issue, I found that there are a number of possible causes of the error:

Namespace Error
Matt Faus: This error occured to me because of a namespace issue. I had a form that had been developed originally on a previous version of InfoPath...

Inserting Empty Section into Form - Similar to the issue that I was having.

MicroSoft Support KB (post-Service Pack 2 hotfix package)
When you try to add a picture to a picture control in a form in InfoPath 2003, the picture is not added. Additionally, you receive the following error message: InfoPath has encountered an error. The operation failed.
This issue may occur if you have Microsoft Windows Internet Explorer 7 installed on the computer.I would be interested to know if anyone has come accross a solution for repairing a form template that can't be edited in design mode due to this error.

Share this article:
Stumble This Delicious
Delicious
submit to reddit
Facebook
MySpace
MySpace

1 comment:

HaroldPGray said...

I was having the same error - accessing any of the developer toosl - Code Editor, Loading Event, etc.

I fixed my problem by:

Opening InfoPath - Developer / Language / Programming - I saw that the setting was VB (I wanted C# anyway - and had probably not even installed VB with VS)...

Clicked Remove Code

Changed dropdown to C#

Click OK.

Viola... Code Editor will start...

Hope it helps someone else.

In business....

Post a Comment