Ok,
I may be getting some terminology here wrong, so please bare with me. I have a form that has been in use for several years around the office. It is an infopath browser form, that integrates into our SharePoint 2010 environment. It's mainly a sign off form, but as management has requested to track new things, I've added new fields into the form to accommodate their requests.
I also have workflows on the library to handle various tasks, or send various alerts, but one thing I've noticed is that the xml in the doc library has only the fields that were available in the doc at the time it was last saved. That's logical enough to me - how could it possibly have what it didn't know about. It's not until I open the form and it reloads and I make a save that the any fields added in the interim to the infopath xsn file, are added to the form. I'm not sure what the overall node structure is called (schema?).
My question is, is there some way to force this update from SharePoint programmatically? As a test, I tried using XMLDocument to open a file, toggle one field to false, and write that data back to the file (code attached), but item.File.OpenBinaryStream() does not apparently pull in the new fields as opening the file through the browser does. Does anyone have any thoughts here on how I might achieve what I'm hoping for?
Thanks in advance for any help you may be able to offer.