I've had a request from @julioc for my Solution package that deploys:
- Site Collection Feature
- InfoPath Form
- Automatically to Central Administration Forms Templates
- Site Feature
- InfoPath Form Library
- Provisioned by a Feature
- Includes the Form Content Type automatically hooked up to it
- Projects List
- Provisioned by a Feature
- List is used within the form in a Drop Down binded by a UDCX Data Connection
- UDCX Files in a Data Connection Library
- Provisioned by a Feature
- Creates a Data Connection Library (DCL) at that Site where Feature activated
- Creates the UDCX files in the DCL and automatically edits the xml with the correct references to the Projects List in that Site
I used STSDev to create this Solution in Visual Studio to give me the Build Targets quick options for deploying in my development environment. I have leveraged Sahil Malik's solution to deploy the InfoPath Form.
The benefits to this approach is:
- No manual deploying of InfoPath Forms in ANY environment
- The ability to retract the entire thing out as it's a Solution package with Features.
- Having the whole Solution Package in SOURCE CONTROL
- UDCX files are automatically generated, no hand coding!
- UDCX files allow the Feature to be activated at different levels of multiple Site Collections and reference the relative Data Connection Library to point to the relative Projects List without hard coding it directly in the InfoPath Form and having multiple copies for each environment (YUCK!).
I will be doing a web cast in the week to walk-through this in more detail. The sample code can be found on my Sky Drive.