2
votes

I'm using MOSS (SharePoint 2007) and InfoPath 2007.

I have a Form Library with an attached InfoPath form, and would like to create new items (forms) in this library during a workflow built in SharePoint designer.

I've tried using the "Create List Item" action, but it doesn't assign the correct metadata (the new item looks fine in a view of the list, but can't be used to render the form (the generic "form has been closed" error comes up if you try to view the item)).

I'm not adverse to writing my own custom WFA to do this in .NET if need be, although it'd be nice to find a simpler solution.

Can anyone provide any resources for how to achieve this in SPD, or programmatically? My searches on the topic so far have been unfruitful...

1

1 Answers

2
votes

Found the solution to this, thanks to a video on YouTube: http://www.youtube.com/v/bcnC_XwCcAg&hl=en&fs=1&rel=0

For anyone else out there who (like me) might not be able to watch YouTube content where they need this information, here's the process:

  1. Create IP form
  2. Publish to SP Server (as doc lib)
  3. On document library, change settings:
    • allow management of content types
    • display in browser
  4. "Fill out" a blank version of the form and save it to the doc lib with name "template"
  5. Open context menu for "template" form and select Download a Copy
  6. Delete "template" form from document library
  7. Open library in windows explorer
  8. Open Forms dir
  9. Paste downloaded copy of "template" form into the Forms dir (as template.xml)
  10. Go back into doc lib settings
    • turn off management of content types
    • change template url to template.xml
    • press OK to save changes
  11. Go back into advanced settings ago, and turn management of content types back on
  12. In SPD, make a WF which uses Create List Item to put an item in that library

And that's it. Just 12 steps needed to publish an InfoPath form so that it behaves as you'd expect, and any SharePoint developer should be familiar with 12-step programs.