This link has been bookmarked by 1 people . It was first bookmarked on 02 Nov 2009, by Hans Muster.
-
Hans MusterYes, I know this title sounds a bit odd, and the real title should be ‘When you are using an InfoPath task edit form, how do you use InfoPath data connection bindings to both retrieve and send data to a SharePoint 2007 workflow?’
So one day I was building an InfoPath 2007 task edit form and I wanted to send data to this form from inside of my workflow by using something like:
taskProperties.ExtendedProperties[“txtProductDescription”] = “Product ABC”;
I implemented an ItemMetadata.xml file with an ‘ows_txtProductDescription’ field, added a secondary data connection for it in my InfoPath form and followed all the normal steps and when I opened the form when my task was created, the data was there as expected.
However, what I didn’t realize was that when I closed the form and completed the task and then re-opened the form just to look at my previous settings, the data was gone! The form appeared as if it were a new form with default settings. To make matters worse, inside of the workflow I discovered that I could not use the task After properties to get the data out of the txtProductDescription field, it was always null. And this is where my multi-day odyssey of searching for the answer began.
To make things simple here, I’m just going to start with a simple form that has no binding and show you how to set things up. I hate to admit it took me several days and talking to several people to figure this out, so I hope it helps you shorten your path to a solution also.
Technologies Used:
* Microsoft Office SharePoint Server 2007 Enterprise Edition, SP1
* InfoPath 2007 – Browser enabled forms
* Visual Studio 2008 SP1 / C#
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.