<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Error relating to a custom Save event handler</title><link>https://www.infopathdev.com:443/forums/thread/47648.aspx</link><pubDate>Wed, 07 Oct 2009 04:04:55 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:47648</guid><dc:creator>Kumaran Pandourangan</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/47648.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=47648</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;In order to avoid the error message, do the following&lt;/p&gt;
&lt;p&gt;1. Double-click the&amp;nbsp;submit button to&amp;nbsp;go to the properties.&lt;/p&gt;
&lt;p&gt;2. Go to&amp;nbsp;&amp;quot;General&amp;quot; tab and click on &amp;quot;Submit Options&amp;quot; and then click on &amp;quot;Advanced&amp;quot;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;3. Click to clear the &amp;quot;Show success and failure message&amp;quot; checkbox.&lt;/p&gt;
&lt;p&gt;You should now see only your error message and not the Infopath error message.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Regards&lt;/p&gt;
&lt;p&gt;Kumaran&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Error relating to a custom Save event handler</title><link>https://www.infopathdev.com:443/forums/thread/47584.aspx</link><pubDate>Mon, 05 Oct 2009 11:02:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:47584</guid><dc:creator>clinter</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/47584.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=47584</wfw:commentRss><description>&lt;p&gt;Hi All, I&amp;#39;m using Infopath &amp;#39;03. I&amp;#39;m trying to&amp;nbsp;disable my Save and Save As commands, when&amp;nbsp;a field&amp;nbsp;named &amp;quot;Current_Status&amp;quot;&amp;nbsp;equals &amp;quot;Review Complete&amp;quot; using VBScript.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here is my code&amp;nbsp;so far...&lt;/p&gt;
&lt;p&gt;Sub XDocument_OnSaveRequest(eventObj) &lt;/p&gt;
&lt;p&gt;&amp;nbsp; If XDocument.DOM.selectSingleNode(&amp;quot;my:myFields/my:Current_Status&amp;quot;).Text = &amp;quot;Review Complete&amp;quot; Then &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;XDocument.UI.Alert(&amp;quot;Sorry you can&amp;#39;t save this document as it is read-only!&amp;quot;) &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; eventObj.ReturnStatus = False &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit Sub &lt;/p&gt;
&lt;p&gt;&amp;nbsp; Else &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; eventObj.IsCancelled = eventObj.PerformSaveOperation &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; eventObj.ReturnStatus = True &lt;/p&gt;
&lt;p&gt;&amp;nbsp; End If &lt;/p&gt;
&lt;p&gt;End Sub&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When i test it my alert box comes up fine, but then another alert box follows which states &amp;quot;Infopath cannot save this form. The OnSaveRequest handler returned a value indicating that the save failed&amp;quot;. Can i change my code to get rid of this alert???&lt;/p&gt;
&lt;p&gt;Hopefully that made sense, you&amp;#39;ll have to excuse me I&amp;#39;m quite new to Infopath. Cheers&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>