<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Newbie with code</title><link>https://www.infopathdev.com:443/forums/thread/44047.aspx</link><pubDate>Thu, 09 Jul 2009 16:08:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:44047</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/44047.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=44047</wfw:commentRss><description>&lt;p&gt;I can&amp;#39;t help but notice that in the code sample you&amp;#39;ve posted, you have exactly the same namespace as was defined in my sample. Since Infopath bases the namespace off the date and time the form was created, it seems unlikely we created our forms at exactly the same date and time.&lt;/p&gt;
&lt;p&gt;One way to find the namespace for your form is to save it as source files and open either template.xml or sampledata.xml in a text editor. Look for the xmlns:my attribute on the root element of my:myFields.&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;</description></item><item><title>Re: Newbie with code</title><link>https://www.infopathdev.com:443/forums/thread/43999.aspx</link><pubDate>Thu, 09 Jul 2009 00:11:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:43999</guid><dc:creator>Mosel</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/43999.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=43999</wfw:commentRss><description>&lt;p&gt;The namespace definition is all there and still the same object error on the var functions&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;XDocument.DOM.setProperty(&amp;quot;SelectionNamespaces&amp;quot;, &amp;#39;xmlns:my=&amp;quot;&lt;a href="http://schemas.microsoft.com/office/infopath/2003/myXSD/2009-07-08T23:17:28&amp;quot;&amp;#39;"&gt;http://schemas.microsoft.com/office/infopath/2003/myXSD/2009-07-08T23:17:28&amp;quot;&amp;#39;&lt;/a&gt;);&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;function XDocument::OnSubmitRequest(eventObj)&lt;br /&gt;{&lt;/p&gt;
&lt;p&gt;&amp;nbsp;var urgency = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:clientgroup/my:Requesturgency&amp;quot;).text;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;var personel_last_name = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:clientgroup/my:Requestfirstname&amp;quot;).text;&lt;br /&gt;&amp;nbsp;var personel_first_name = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:clientgroup/my:Requestlastname&amp;quot;).text;&lt;br /&gt;&amp;nbsp;var location = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:clientgroup/my:Requestlocation&amp;quot;).text;&lt;br /&gt;&amp;nbsp;var due = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:clientgroup/my:Requestcompletion&amp;quot;).text;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;var type = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:Jobtypegroup&amp;quot;).text;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;try&lt;br /&gt;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;var oEnvelope = XDocument.View.Window.MailEnvelope;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;oEnvelope.To = &amp;quot;&lt;a href="mailto:Print&amp;amp;Fulfillment@abc.com"&gt;Print&amp;amp;Fulfillment@abc.com&lt;/a&gt;&amp;quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;oEnvelope.CC = &amp;quot;&lt;a href="mailto:sfmailcenter@abc.com"&gt;sfmailcenter@abc.com&lt;/a&gt;&amp;quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;oEnvelope.Subject = &amp;quot;Copy Print &amp;amp; Fulfillment Request - &amp;quot; + type + &amp;quot; - &amp;quot; + personel_last_name + &amp;quot;, &amp;quot; + personel_first_name + &amp;quot; - &amp;quot; + location + &amp;quot; - &amp;quot; + urgency + &amp;quot; - &amp;quot; + due;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;oEnvelope.Visible = true;&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;catch (ex)&lt;br /&gt;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;XDocument.UI.Alert(ex.description);&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; eventObj.ReturnStatus = true&lt;br /&gt;&amp;nbsp;&lt;br /&gt;}&lt;/p&gt;</description></item><item><title>Re: Newbie with code</title><link>https://www.infopathdev.com:443/forums/thread/43998.aspx</link><pubDate>Wed, 08 Jul 2009 23:28:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:43998</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/43998.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=43998</wfw:commentRss><description>&lt;p&gt;I wonder if you accidentally deleted the namespace definition from the top of the script file. It looks like this (only your namespace would be different for your form):&lt;/p&gt;
&lt;blockquote&gt;&lt;span style="FONT-FAMILY:&amp;#39;Courier New&amp;#39;;COLOR:green;FONT-SIZE:10pt;mso-no-proof:yes;"&gt;// The following line is created by Microsoft Office InfoPath to define the prefixes &lt;/span&gt;&lt;span style="FONT-FAMILY:&amp;#39;Courier New&amp;#39;;COLOR:green;FONT-SIZE:10pt;mso-no-proof:yes;"&gt;// for all the known namespaces in the main XML data file. &lt;/span&gt;&lt;span style="FONT-FAMILY:&amp;#39;Courier New&amp;#39;;COLOR:green;FONT-SIZE:10pt;mso-no-proof:yes;"&gt;// Any modification to the form template files made outside of InfoPath &lt;/span&gt;&lt;span style="FONT-FAMILY:&amp;#39;Courier New&amp;#39;;COLOR:green;FONT-SIZE:10pt;mso-no-proof:yes;"&gt;// will not be automatically updated. &lt;/span&gt;&lt;span style="FONT-FAMILY:&amp;#39;Courier New&amp;#39;;COLOR:green;FONT-SIZE:10pt;mso-no-proof:yes;"&gt;// XDocument.DOM.setProperty(&amp;quot;SelectionNamespaces&amp;quot;, &amp;#39;xmlns:my=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/myXSD/2009-07-08T23:17:28&amp;quot;&amp;#39;); //&lt;/span&gt;&lt;span style="FONT-FAMILY:&amp;#39;Courier New&amp;#39;;COLOR:green;FONT-SIZE:10pt;mso-no-proof:yes;"&gt;//&amp;lt;namespacesDefinition&amp;gt;&lt;/span&gt;&lt;span style="FONT-FAMILY:&amp;#39;Courier New&amp;#39;;FONT-SIZE:10pt;mso-no-proof:yes;"&gt;XDocument.DOM.setProperty(&lt;span style="COLOR:#a31515;"&gt;&amp;quot;SelectionNamespaces&amp;quot;&lt;/span&gt;, &lt;span style="COLOR:#a31515;"&gt;&amp;#39;xmlns:my=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/myXSD/2009-07-08T23:17:28&amp;quot;&amp;#39;&lt;/span&gt;);&lt;/span&gt;&lt;span style="FONT-FAMILY:&amp;#39;Courier New&amp;#39;;COLOR:green;FONT-SIZE:10pt;mso-no-proof:yes;"&gt;//&amp;lt;/namespacesDefinition&amp;gt;&lt;/span&gt; 
&lt;p&gt;&lt;/p&gt;&lt;/blockquote&gt;</description></item><item><title>Re: Newbie with code</title><link>https://www.infopathdev.com:443/forums/thread/43996.aspx</link><pubDate>Wed, 08 Jul 2009 23:12:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:43996</guid><dc:creator>Mosel</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/43996.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=43996</wfw:commentRss><description>&lt;p&gt;The error occures on each and every var. I have checked the xPath and each and every line is correct.&lt;/p&gt;</description></item><item><title>Re: Newbie with code</title><link>https://www.infopathdev.com:443/forums/thread/43991.aspx</link><pubDate>Wed, 08 Jul 2009 22:32:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:43991</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/43991.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=43991</wfw:commentRss><description>&lt;p&gt;What line is the error on? This looks like it should be fine, if I compare it to this &lt;a href="http://msdn.microsoft.com/en-us/library/bb250998.aspx"&gt;MSDN&lt;/a&gt; sample. As long as the XPath is right for each of the variables that you are setting with values from the form....&lt;/p&gt;</description></item><item><title>Newbie with code</title><link>https://www.infopathdev.com:443/forums/thread/43969.aspx</link><pubDate>Wed, 08 Jul 2009 17:54:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:43969</guid><dc:creator>Mosel</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/43969.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=43969</wfw:commentRss><description>&lt;p&gt;Hello all!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I am trying to create a copy request form in IP 2003 and have been able to write some code. When&amp;nbsp;I try to submit the form I get a OBJECT REQUIRED error. I cant figure this out. Here is the code:&lt;/p&gt;
&lt;p&gt;function XDocument::OnSubmitRequest(eventObj)&lt;br /&gt;{&lt;/p&gt;
&lt;p&gt;&amp;nbsp;var urgency = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:clientgroup/my:Requesturgency&amp;quot;).text;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;var personel_last_name = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:clientgroup/my:Requestfirstname&amp;quot;).text;&lt;br /&gt;&amp;nbsp;var personel_first_name = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:clientgroup/my:Requestlastname&amp;quot;).text;&lt;br /&gt;&amp;nbsp;var location = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:clientgroup/my:Requestlocation&amp;quot;).text;&lt;br /&gt;&amp;nbsp;var due = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:clientgroup/my:Requestcompletion&amp;quot;).text;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;var type = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:Jobtypegroup&amp;quot;).text;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;try&lt;br /&gt;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;var oEnvelope = XDocument.View.Window.MailEnvelope;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;oEnvelope.To = &amp;quot;&lt;a href="mailto:Print&amp;amp;Fulfillment@abc.com"&gt;Print&amp;amp;Fulfillment@abc.com&lt;/a&gt;&amp;quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;oEnvelope.CC = &amp;quot;&lt;a href="mailto:sfmailcenter@abc.com"&gt;sfmailcenter@abc.com&lt;/a&gt;&amp;quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;oEnvelope.Subject = &amp;quot;Copy Print &amp;amp; Fulfillment Request - &amp;quot; + type + &amp;quot; - &amp;quot; + personel_last_name + &amp;quot;, &amp;quot; + personel_first_name + &amp;quot; - &amp;quot; + location + &amp;quot; - &amp;quot; + urgency + &amp;quot; - &amp;quot; + due;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;oEnvelope.Visible = true;&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;catch (ex)&lt;br /&gt;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;XDocument.UI.Alert(ex.description);&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; eventObj.ReturnStatus = true&lt;br /&gt;&amp;nbsp;&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>