Does anyone have any idea how to deploy an InfoPath Form (2007) as a Site ContentType programatically (script or object model)? I do not want the form published to Central Admin and FormServerTemplates, but rather a Forms Library created by a Web scoped feature. The intention is to be able to publish the form via script or code in order to deploy and test the form in dev/stage/prod environments.
views:
535answers:
1Well, I had to cut bait. Seems the two links provided a workable solution for now.
Sahil Malik's articel here http://blah.winsmarts.com/2008-8-Deploying_InfoPath_2007_Forms_to_Forms_Server_-and-ndash_Properly.aspx provided enough information to deploy the form and the data connection was a simple matter of adding a module to the elements file for the feature. Some tips for this can be found here http://geekswithblogs.net/DanielC/archive/2009/01/14/deploy-data-connection-files-.udcx-to-sharepoint-data-connection-library.aspx
Howerver, it seems there is no way to deploy a form to anything other than a Site Feature. After diving into the assembly Sahil mentions with Reflector, there is a check in the code to ensure the Feature is Site scoped. Arrgghh. If anyone can explain why this is, and perhaps an alternative, I would greatly appreciate it! Hope this helps someone else.