<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title> Sundar Narasiman's Random Musings on .NET and SharePoint : Inofpath</title><link>http://msmvps.com/blogs/sundar_narasiman/archive/tags/Inofpath/default.aspx</link><description>Tags: Inofpath</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>State Management in Infopath Forms</title><link>http://msmvps.com/blogs/sundar_narasiman/archive/2008/06/23/state-management-in-infopath-forms.aspx</link><pubDate>Mon, 23 Jun 2008 16:15:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1637049</guid><dc:creator>lavssun</dc:creator><slash:comments>2</slash:comments><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/sundar_narasiman/commentapi.aspx?PostID=1637049</wfw:comment><comments>http://msmvps.com/blogs/sundar_narasiman/archive/2008/06/23/state-management-in-infopath-forms.aspx#comments</comments><description>&lt;p&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;I&amp;#39;m currently working on a project that involves the modernization of lotus notes application to SharePoint-InfoPath stack. We are facing a scenario where we need to &lt;strong&gt;pass data between the two InfoPath forms Form A and Form B. &lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;I was wondering whether InfoPath supports any form of state management. After a bit of research. the following blog post says&amp;nbsp;it&amp;#39;s feasible&lt;/span&gt; 
&lt;p&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;&lt;a href="http://blogs.msdn.com/infopath/archive/2007/02/26/passing-data-into-a-form-input-parameters.aspx"&gt;&lt;span style="COLOR:blue;mso-bidi-font-size:11.0pt;"&gt;http://blogs.msdn.com/infopath/archive/2007/02/26/passing-data-into-a-form-input-parameters.aspx&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;The idea is to pass data as the&amp;nbsp;Query String Parameter from Form A to Form B like the following&lt;/span&gt;&lt;i&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-size:11.0pt;"&gt;&lt;a href="http://www.testsite.com/formb.xsn?param1a=1&amp;amp;param2a=2"&gt;&lt;span style="COLOR:blue;"&gt;http://www.testsite.com/formb.xsn&lt;b&gt;?param1a=1&amp;amp;param2a=2&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;In the code-beside of the Form B, we need to&amp;nbsp;receive the parameters like the following.&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;string&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt; bazValue = e.InputParameters[&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:maroon;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;&amp;quot;param1a&amp;quot;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;];&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-no-proof:yes;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;string&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-no-proof:yes;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt; bizValue = e.InputParameters[&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:maroon;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-no-proof:yes;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;&amp;quot;param2a&amp;quot;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-no-proof:yes;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;];&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt; &lt;/span&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;&lt;strong&gt;Note:-&lt;/strong&gt;&lt;/span&gt; 
&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;This works for browser InfoPath enabled 2007 forms too. VSTA (Visual Studio Tools for Application) needs to be used to wire the above logic inside the Form_Loaded event. I&amp;#39;m not sure whether this is the optimal way. If anyone has found a better way for InfoPath State management, please update me&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1637049" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/sundar_narasiman/archive/tags/Inofpath/default.aspx">Inofpath</category></item><item><title>Infopath Browser Forms Error The form has been closed</title><link>http://msmvps.com/blogs/sundar_narasiman/archive/2008/02/13/infopath-browser-forms-error-the-form-has-been-closed.aspx</link><pubDate>Wed, 13 Feb 2008 06:06:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1511744</guid><dc:creator>lavssun</dc:creator><slash:comments>0</slash:comments><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/sundar_narasiman/commentapi.aspx?PostID=1511744</wfw:comment><comments>http://msmvps.com/blogs/sundar_narasiman/archive/2008/02/13/infopath-browser-forms-error-the-form-has-been-closed.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;Scenario&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;XMLFormView web part is used to render the Infopath browser forms.&amp;nbsp;&amp;nbsp;The XmlFormView web part&amp;nbsp;cannot add to the web part page. It throws error message &amp;quot;The form has been closed&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cause&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This problem can be due to several reasons. They are listed below&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The location &amp;quot;.xsn&amp;quot; might be hard-coded with an incorrect location&lt;/li&gt;
&lt;li&gt;The XML FormView web part might be deployed to bin without sufficient code-access permissions&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;b&gt;Solution&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;This can be solved by the following steps&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Not to hard-code the .xsn location in the code-behind of XmlFormView web part&lt;/li&gt;
&lt;li&gt;Provide the proper code-access permissions to the web part&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;font style="BACKGROUND-COLOR:#c0c0c0;"&gt;&lt;font color="#0000ff" size="2"&gt;Imports&lt;/font&gt;&lt;font size="2"&gt; System.Security&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font style="BACKGROUND-COLOR:#c0c0c0;" size="2"&gt;
&lt;p&gt;&amp;lt;Assembly: AllowPartiallyTrustedCallers()&amp;gt;&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;After adding the web part to the web part page, provide the correct location of &amp;quot;.xsn&amp;quot; to the web part property&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1511744" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/sundar_narasiman/archive/tags/Inofpath/default.aspx">Inofpath</category></item></channel></rss>