Category Archives: InfoPath 2007 // Forms Server

Accidentally Adding Code to an InfoPath Form; Deliberately Removing It

When working with buttons on a form, we often add rules.  You access the rules editor from the properties of the button.

When clicking around quickly, it’s easy to accidentally click on "Edit Form Code" instead of "Rules …".

The first time I did this, I canceled out of the code editor.  However, when I tried to publish the form a little while later, it required that I publish as an "Administrator-approved form template (advanced)".  I didn’t actually do any programming and I absolutely didn’t want to go through an unnecessary approval process.  I was in a bit of panic at the time due to time constraints.  To get past it, I simply restored a previous backup and continued.  I had recently seen some blog posts about people going into the form’s XML to tweak things and I was afraid I would have to do something similar.

Today, I did it again.  This time, I had a little more time on my hands and found that you can easily undo this.

Go to:

Tools -> Form Options -> Programming: "Remove Code"

It does not get much easier than that.

</end>

Technorati Tags: ,

MOSS: Observations on InfoPath debugging

InfoPath form server error messages are misleading.

 

During development of an InfoPath form, I would post it to MOSS server and access the form. The form would start to load and then generate a misleading error message pointing me to the windows event log for details. In fact, no message was written to the windows event log. Rather, the message was sent to the MOSS ascii diagnostic log. You can track that down via central services administration.

 

You need to be quick on your feet. MOSS likes to write to the log file, frequently and verbosely. This can be trimmed but the default log writing behavior is "everything as quickly as possible".