<?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: Submit Email Validation Via Code</title><link>https://www.infopathdev.com:443/forums/thread/29066.aspx</link><pubDate>Fri, 30 May 2008 15:06:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29066</guid><dc:creator>admot</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29066.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=29066</wfw:commentRss><description>&lt;p&gt;I would really like to do it via rules and actions. However, my goal is to close the form and the application. From what I understand, this can only be accomplished via code. I noticed when I ran the &amp;quot;Submit to: Email&amp;quot;, the OnSubmitRequest(eventObj) did not fire. Therefore, it seems to be [Use rules but can&amp;#39;t close app] vs [Use code and close app].&lt;/p&gt;
&lt;p&gt;Guess I need a better understanding of the &amp;quot;Submit to: Email&amp;quot; confirmation of success/fail as its kind of confusing. In my code in the previous post, I get an error message when I click submit then cancel. The error message says &amp;quot;The form was not submitted because the action was cancelled.&amp;quot; but then my custom failure message I setup in the rules appears. But when I use rules/actions to submit, my custom failure message doesn&amp;#39;t appear when I hit submit then cancel.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Right now, I would like to at least get it to a point where it doesn&amp;#39;t produce an error flag if I click submit then cancel. Suggestions?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;BTW: CC&amp;#39;ing the sender as a &amp;quot;receipt&amp;quot; is a good idea for a confirmation. I can also just provide a popup to check their send box to confirm it was send (if they keep their send emails).&lt;/p&gt;</description></item><item><title>Re: Submit Email Validation Via Code</title><link>https://www.infopathdev.com:443/forums/thread/29048.aspx</link><pubDate>Thu, 29 May 2008 20:11:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29048</guid><dc:creator>Clay Fox</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29048.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=29048</wfw:commentRss><description>&lt;p&gt;Any reason why you are doing this in code rather than rules and actions.&lt;/p&gt;
&lt;p&gt;You can submit and close the form there too.&lt;/p&gt;
&lt;p&gt;You can use an .Alert(&amp;quot;Done&amp;quot;) in code to generate a message box if you want.&lt;/p&gt;
&lt;p&gt;I believe you would receive an error if there was a problem but not sure how you can provide a confirmation.&lt;/p&gt;
&lt;p&gt;Typically I always copy the form user on the submit email so that they have a &amp;quot;receipt&amp;quot; to verify the process. You could give them the option for this in the form too.&lt;/p&gt;</description></item><item><title>Submit Email Validation Via Code</title><link>https://www.infopathdev.com:443/forums/thread/29043.aspx</link><pubDate>Thu, 29 May 2008 19:57:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29043</guid><dc:creator>admot</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29043.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=29043</wfw:commentRss><description>&lt;p&gt;I have a data connection to submit a form via email called &amp;quot;emailMySubmit&amp;quot;. When I perform a &amp;quot;Submit To Email&amp;quot;, I get a popup confirmation stating &amp;quot;The form was submitted successfully.&amp;quot; I assume this means it performed a validaiton to ensure it was sent to Outlook. &lt;/p&gt;
&lt;p&gt;Since I want to close InfoPath after a submit, I placed in a &amp;quot;XDocument.View.Window.Close(true);&amp;quot; command which I got from a search from this site :). &lt;br /&gt;This means I need to &amp;quot;Custom submit using form code&amp;quot;. The code I used is below since I cant use the &amp;quot;Submit To Email&amp;quot; and the OnSubmitRequest event at the same time.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;function XDocument::OnSubmitRequest(eventObj)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; XDocument.DataAdapters[&amp;quot;emailMySubmit&amp;quot;].Submit(); &lt;br /&gt;&amp;nbsp;&amp;nbsp;XDocument.View.Window.Close(true);&lt;br /&gt;}&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I noticed the popup confirmation did not appear when I used this approach. I assume this is because I am going through code.&lt;/p&gt;
&lt;p&gt;Question: &lt;br /&gt;1) Is there a way to perform a confirmation in code and indicate if it was a success or failure? I did a search on this site and google and I found some checking via a SharePoint website but not via email. &lt;br /&gt;2) Is the confirmation already done and it just doesn&amp;#39;t provide a popup?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;</description></item></channel></rss>