<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Onsubmit event handler did not work</title><link>https://www.infopathdev.com:443/forums/thread/68541.aspx</link><pubDate>Tue, 19 Jul 2011 15:02:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:68541</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/68541.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=68541</wfw:commentRss><description>&lt;p&gt;It looks like your OnSubmit event handler is throwing an exception.&amp;nbsp; It looks like your code is trying to access a data connection that doesn&amp;#39;t exist.&amp;nbsp; Do you have code like that?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Edit: Looking at the code from that blog, there is a line that accesses a data connection called &amp;quot;Main submit&amp;quot;. Do you have a data connection called &amp;quot;Main submit&amp;quot;?&lt;/p&gt;</description></item><item><title>Onsubmit event handler did not work</title><link>https://www.infopathdev.com:443/forums/thread/68537.aspx</link><pubDate>Tue, 19 Jul 2011 13:59:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:68537</guid><dc:creator>Shyam23</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/68537.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=68537</wfw:commentRss><description>&lt;div class="ForumPostContentText"&gt;
&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have&amp;nbsp;published several infopath forms as content types and saved the workspace as a template. Users will create many workspaces based on my template. I need the url of the workspace when the form is opening. If I use, substring-before(substring-after(processing-instruction()[local-name(.) = &amp;quot;mso-infoPathSolution&amp;quot;], &amp;#39;href=&amp;quot;&amp;#39;), &amp;#39;&amp;quot;&amp;#39;), it gives me the url of the content type. I used the code as per this blog: &lt;a href="http://blogs.msdn.com/b/infopath/archive/2006/11/08/submitting-to-this-document-library.aspx?PageIndex=10&amp;amp;CommentPosted=true#commentmessage"&gt;http://blogs.msdn.com/b/infopath/archive/2006/11/08/submitting-to-this-document-library.aspx?PageIndex=10&amp;amp;CommentPosted=true#commentmessage&lt;/a&gt;. Now I get an error. &lt;/p&gt;
&lt;p&gt;&amp;quot;Infopath cannot submit the form The onsubmit event handler did not work&lt;/p&gt;
&lt;p&gt;The given key was not present in the dictionary.&lt;br /&gt;&amp;nbsp;&amp;nbsp; at System.ThrowHelper.ThrowKeyNotFoundException()&lt;br /&gt;&amp;nbsp;&amp;nbsp; at System.Collections.Generic.Dictionary`2.get_Item(TKey key)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at Microsoft.Office.InfoPath.Internal.DataConnectionsHost.get_Item(String name)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at Stakeholder_checklist_final.aspx.FormCode.FormEvents_Submit(Object sender, SubmitEventArgs e)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at Microsoft.Office.InfoPath.Internal.FormEventsHost.OnSubmit(DocReturnEvent pEvent)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at Microsoft.Office.Interop.InfoPath.SemiTrust._XDocumentEventSink2_SinkHelper.OnSubmitRequest(DocReturnEvent pEvent) &amp;quot;&lt;/p&gt;
&lt;p&gt;I have security as &amp;quot;full trust&amp;quot; only, but still I get this error. Can anyone guide where I am going wrong ?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Shyam&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;</description></item></channel></rss>