Hi guys,
I have an administrator-approved InfoPath 2010 form hosted in a XmlFormView control inside a SharePoint 2010 application page (deployed to Layouts) This form submits to a hosting environment (ASP.NET), and works great when performing an initial submit. The values for fields which I have promoted as site columns carry over their values nicely to the document library. My problem starts when I open the form for updating. The form is also opened using the application page. I can submit the form without any issues, and the form preserves its data from the update; opening up the form again shows that the fields have been updated. However, the values for fields that have been promoted as site columns do not get updated; the SharePoint columns retain the original values they had when the form was 1st submitted.
I've tried a couple of approaches for this:
- retrieved the file (InfoPath form) and updated it in the SubmitToHost event handler - doesn't do anything different
- retried the item that the file is tied to and tried updating that: SharePoint will throw an error saying the item is being updated (by the current user, which makes sense).
- simply letting the post go through, which also doesn't do anything.
I don't want to have to open the InfoPath form via code and update the columns manually because the application page doesn't know the form at design-time, and an Xml parser isn't in the picture at the moment because we don't have control over the conventions that the InfoPath form designers will use when building their forms. I'll probably also run into the same issue above about the item currently being updated (item 2).
So, the short question is: how do I let InfoPath update the SharePoint columns its fields are promoted to when submitting an "edited" (not new) form to a hosting environment?
Dino