Schema Validation Errors with InfoPath Document Information Panels

I ran into a situation with some custom InfoPath Document Information Panels where I was getting schema validation errors like this one because of a Business Data Column I added to a document library:

“…{guid}ColumnName is unexpected according to content model of parent element ‘documentManagement’.”

You might run into this in the following situation:

  1. You create the DIP on a Site Content Type.
  2. You configure a document library to use your Site Content Type.
  3. You add a custom column to the Document Library (and subsequently to the List Content Type (the local instance of your site content type that is applied to the list)).

In this situation, your Document Information Panel was created without the knowledge of this extra column, and does not have a field in its data source schema for this column. What I believe is happening is that when attempting to view the DIP, SharePoint is passing all the columns on the document library to the InfoPath form, and the form is not expecting this extra column, so it chokes (very lame, Microsoft).

To get around this:

  1. Edit the DIP on the List Content Type (List Settings, click content type name, Document Information Panel Settings, Edit this Template link)
  2. Once the form loads in InfoPath, choose Tools > Convert Main Data Source…
  3. Enter the absolute url to your document library (e.g. http://yoursitecollection/subsite/your doc library name), and click Next.
  4. Finish the wizard and view your Data Source. Expand the nodes and you should see the extra list column appear now.

This is also a great way to update the DIP on your List Content Type, especially if you have locally overridden the Optional/Required/Hidden settings on columns from the parent Site Content Type.

This workaround kind of defeats the whole point of setting the Panel at the Site Content Type level, but that’s the only way I could get it to work.

One comment on “Schema Validation Errors with InfoPath Document Information Panels

Comments are closed.