SpidyNet

Hi,

i have a custom workflow , i'm using Infopath forms as an taskforms . i have a infopath form which contains some custom code , how to publish the infopath form that contains the custom code , i got an article for the same.

what i did

( i want to view the infopath form in browser )

1. i published the form to sharepoint list and requested for admins approval.

2. then in the Central Admin -- i uploaded the Form it uploaded successfully...

3. now the content list which i'm using i modified the list setting to manage the content type ..

i associated the published form with the workflow means in the feature.xml i specified the urn of the published form, when i move to the stage it shows the Form cannot be open..

please help me out

i know i'm missing important steps can any1 tell me

how can we publish infopath form which contains custom code and how can we

associate the same form with the workflow as an task form



Re: SharePoint - Workflow Publishing Infopath Forms ( Containing Custom Code )

Robin H. Sanner

What error do you get



Re: SharePoint - Workflow Publishing Infopath Forms ( Containing Custom Code )

Shaun Fuchs

if you are getting a ddl error, then you need to copy the infopath compiled dll to your features dir.

Set your infopath form to have full trust.
load up the vs for apps from infopath.
compile.
find out where the project sits.
copy the new dll in the release folder to your feature files dir.
add this to the batch file

xcopy /s /Y "%FEATUREDIR%\*.dll" "%FEATURESDIR%\%PROJECTNAME%"







Re: SharePoint - Workflow Publishing Infopath Forms ( Containing Custom Code )

SpidyNet

I have done that , i have copied the DLL to the folder but still it doesn't gives me error that it could not find one or more dependencies . It doesn't open the form



Re: SharePoint - Workflow Publishing Infopath Forms ( Containing Custom Code )

George Olson

Here is a walkthrough by Josh Meyer that may help: http://geekswithblogs.net/jgmeyer/archive/2006/06/26/83087.aspx

I haven't had a chance to do this yet, so can you please tell me if you have success





Re: SharePoint - Workflow Publishing Infopath Forms ( Containing Custom Code )

ToHe

Here is what i did to deploy a form with custom code to use it in a workflow as initiation form, but that should work with task edit forms as well:

  1. Design the form in InfoPath with the custom code and set the trust level to domain
  2. Save the form to the desktop
  3. Publish the form to a network location. Choose your workflow solution folder as location and make sure you don't set an alternative path.
  4. Save the form as source files
  5. Paste the URN of the form in the workflow.xml file
  6. Build your workflow
  7. run the install.bat (or use the DEPLOY setting in the Post-Build)
  8. Copy the form DLL from the location set in step 4 to "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\YOUR_WORKFLOW_FOLDER"
  9. (Hopefully) enjoy your workflow form

The workflow installation automatically publishes the form to the Form Templates you can see in the Central Administration --> Application Management --> Manage Form Templates.





Re: SharePoint - Workflow Publishing Infopath Forms ( Containing Custom Code )

SpidyNet

Hey thanks for ur reply ,, i tried.. but till.. i get the error that one or more dependencies are not available

do i need to have those assemblies.. in GAC





Re: SharePoint - Workflow Publishing Infopath Forms ( Containing Custom Code )

ToHe

No they don't have to be in the GAC. I had that problem as well sometimes. Try the following:

  • Open the published form in design mode: right-click --> design (the form should be in your workflow solution folder).
  • Open the code behind by choosing the option of your control (or whereever you put the custom code)
  • Sometimes (or every time) you then have to choose the InfoPath solution folder with your code behind files
  • Choose the folder your Visual Studio project is in, let it open Visual Studio and close it without building oder changing something
  • Close your form (he might ask you to save the form, then just do so)
  • do an iisreset to be able to delete the form dll from the server directory (C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\YOURWORKFLOWFOLDER)
  • "install" your workflow again (so that the form on the server is updated)
  • copy the dll to the server directory again

I hope it does work now... Smile