Skip to main content

Hello,


I just started working with infopath. I created my form, which has custom code, and I deployed it to our SharePoint site via Central Admin since I have access to Infopath Services.


I need to make a workflow that utilizes the data in the form. I don't want to have all the data displayed in the SharePoint list if I can help it. I figure that I need to use the Infopath integration process,  but it keeps asking for smart objects, which I didn't think I would need.


Can someone explain what I need to do or is there a blog post somewhere I could read it.


Thanks.

Hi


The SmartObject step in the InfoPath integration wizard is optional.  If you don't want to query SmartObjects from within your InfoPath form then just click next and continue on. 


Note:  In the future depending on what you want to do you might be able to use SmartObjects in InfoPath form instead of custom code.  But since I'm assuming your code is already written and tested its probably faster to continue using it.  Personally I typically use SmartObjects in my InfoPath form to get user details out of AD, retrieve user comments and get information from other datasources like other SharePoint lists or SQL tables.


Here is a K2 blackpearl help topic about integrating InfoPath with Code Behind that should also help out:


Concepts > Integration > InfoPath > Integrating K2 blackpearl with InfoPath with Code Behind


 


Hi Tim,


Thanks for the link. I am getting a ton of errors when I try to use the wizard. Specifically these two:


"Could not find file 'C:UsersEasternwindAppDataLocalTempSourceCode.Workflow.Infopath.TempFormTemplate24SolutionFilesChild (JobNum)1.'." when I try to skip the smart objects screen, and


"The InfoPath form template cannot integrate with the process if the submit option has been configured to use code. Remove the current submit option." when I try to finish the Integration wizard. I have changed the submit so that it uses a Job name to automatically save itself, but no specific code.


I'm not sure why the wizard is throwing either of those erros....


From what you describe I would try removing the submit options altogether and the InfoPath Integration wizard should add in the necessary data connection and submit options for you.


You also describe a job name to automatically save itself.  I would remove that option as well as it probably doens't apply when working with K2 since K2 will automatically save the form to the form library as part of an InfoPath client event for user tasks.  Later on in the process you can use the SharePoint document event to save the form to a form library for archive purposes if required.


 


Hi Tim,


I removed my submit options, and the error about the custom submit code went away. I am still getting the:


"Could not find file 'C:UsersEasternwindAppDataLocalTempSourceCode.Workflow.Infopath.TempFormTemplate26SolutionFilesParent (JobNum)1.'."


I checked, and the folder does exist in that location. I'm not sure why it isn't seeing it.


Just try by creating the folder that it is looking for (forget about the file). This has worked for me couple of times.


Thanks Manjuna that seemed to work. Although, I find it odd since the folder, and everything exists.


I am getting the error:


"The schema does not contain the following element: myFields," but I know I have that...


I appreciate all the help.


I want to add that in addition to Timkin's answer, which worked well.


There is a bug when working with K2 Designer in Windows 7 where both of those errors were popping up. It's being looked into by K2, but the work-around for now is to use XP/ Win Server 2003.


Thanks timkn. To elaborate, for me using InfoPath 2010, the solution involved unchecking the "Allow Users to Submit this Form" checkbox from the Submit Options menu in InfoPath. Re-running "Integrate With Smart Object" one more time does not hurt, in case something has changed. The Exception went away after publishing the form.


Victor M Santiago
SharePoint Architect | LiveNexus Technologies | http://www.linkedin.com/in/VictorSantiago
Florida, USA


Reply