InfoPath Error - Updating Content Type Failed When Publishing to SharePoint - SharePoint Development & Administration + InfoPath

Sunday, October 18, 2009

InfoPath Error - Updating Content Type Failed When Publishing to SharePoint

When Publishing an InfoPath Form to a SharePoint site Content Type, the process may fail when trying to Update the Site Content Type if there are a large number of fields being promoted to SharePoint columns/fields in the Content Type with an "Updating Site content Type Failed" message.

One solution for this is to create a separate list with a lookup column/field back to the list which uses the Content Type created by InfoPath. The fields which are removed from the Content Type can be added to the separate list instead.

When the InfoPath Form is submitted, rules can be configured to create or update an item in the separate list which corresponds to the form being submitted, with the additional data.

How to Solve:

1. Make a full backup the InfoPath Form Template and the SharePoint Site (Content Types, Lists, etc.)

2. Choose which fields to add to the separate list instead of promoting/submitting with the form data.

3. Remove the fields from the list of promoted fields (Tools -> Form Options -> Property Promotion - or remove the fields when you next publish the form)

Note: Enough fields need to be removed to allow the form to be published successfully, as well as consistently. At this point, if you can't get the form to publish to a Content Type without receiving an "Error updating Content Type" (or similar) message by reducing the number of promoted fields, then the problem is caused elsewhere and the solution in this article will not apply.

4. Add a CAML XML template Data Connection to store the data required to add or update an item in the separate list. See InfoPath - Update Existing SharePoint List Item Programmatically Using CAML for details.

5. Add event handlers or and a main function to populate the CAML template with the data required to create or update an item in the separate list. See InfoPath - Update Repeating Elements/Nodes in a Secondary Data Source for details.

6. Create a Submit Data Connection which uses the UpdateListItems Web Service and the CAML template (created in Step 4) to create or update an item in the separate list. See InfoPath - Update Existing SharePoint List Item Programmatically Using CAML for details.

7. Configure rules to submit the CAML template using the Data Connection created in Step 6, then submit the form using the main submit data connection when the form is submitted. See InfoPath - Update Existing SharePoint List Item Programmatically Using CAML for details.
Share this article:
Stumble This Delicious
Delicious
submit to reddit
Facebook
MySpace
MySpace

1 comment:

Theresa said...

its associated with the content database specified for the web application. if find any error to DB connectivity .

http://sharepointconsulting.webs.com

Post a Comment