<?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: The following error occurred:Server was unable to process request. ---&gt; Object reference not set to an instance of an object.</title><link>https://www.infopathdev.com:443/forums/thread/35409.aspx</link><pubDate>Sat, 06 Dec 2008 18:10:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35409</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35409.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=35409</wfw:commentRss><description>&lt;p&gt;That error is occurring on the SharePoint server itself, and a likely cause is that you are not specifying a listName as a parameter to the WebMethod.&amp;nbsp; If you are specifying a listName, what is the value you are using?&amp;nbsp; It should be a &lt;a class="" title="GUID" href="http://en.wikipedia.org/wiki/Globally_Unique_Identifier" target="_blank"&gt;GUID&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;See also:&lt;br /&gt;&lt;a href="http://weblogs.asp.net/jimjackson/archive/2008/02/11/get-a-sharepoint-list-guid-from-the-browser.aspx" target="_blank"&gt;Get a SharePoint list GUID from the browser&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.infopathdev.com/blogs/matt/archive/2006/02/02/Add-SharePoint-List-Items-with-InfoPath.aspx" target="_blank"&gt;Add SharePoint list items with InfoPath&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Re: The following error occurred:Server was unable to process request. ---&gt; Object reference not set to an instance of an object.</title><link>https://www.infopathdev.com:443/forums/thread/35408.aspx</link><pubDate>Sat, 06 Dec 2008 16:50:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35408</guid><dc:creator>m181354</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35408.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=35408</wfw:commentRss><description>&lt;p&gt;&lt;strong&gt;I made the following corrections but I still get the same error.&amp;nbsp; I deleted he Location column and re-added it so the right name is used.&amp;nbsp; I was testing with using Rules for the submit option is why there were two sets of Submits.&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The following error occurred:&lt;/p&gt;
&lt;p&gt;InfoPath cannot submit the form.&lt;br /&gt;An error occurred while the form was being submitted.&lt;br /&gt;The SOAP response indicates that an error occurred on the server:&lt;/p&gt;
&lt;p&gt;Server was unable to process request. ---&amp;gt; Object reference not set to an instance of an object.&lt;/p&gt;
&lt;p&gt;File:script.js&lt;br /&gt;Line:43&lt;/p&gt;&lt;font size="2"&gt;
&lt;p&gt;Attached, please find an update which uses C# Managed Code (for IP2003) to do the task.&lt;/p&gt;
&lt;p&gt;There were some problems with the form and code:&lt;/p&gt;
&lt;p&gt;1. The Add button performed a submit and requery, followed by the code performing a submit.&lt;/p&gt;
&lt;p&gt;a. Removed the submit/query rules and added query functionality to code.&lt;/p&gt;
&lt;p&gt;2. The EventCAML.xml file had a wrong field name listed, causing the submit error:&lt;/p&gt;
&lt;p&gt;&amp;lt;Field Name=&amp;quot;Location&amp;quot;&amp;gt;&amp;lt;/Field&amp;gt;&lt;/p&gt;
&lt;p&gt;Should have been:&lt;/p&gt;
&lt;p&gt;&amp;lt;Field Name=&amp;quot;Change_x0020_Request_x0020_Title&amp;quot;&amp;gt;&amp;lt;/Field&amp;gt;&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: The following error occurred:Server was unable to process request. ---&gt; Object reference not set to an instance of an object.</title><link>https://www.infopathdev.com:443/forums/thread/35362.aspx</link><pubDate>Fri, 05 Dec 2008 12:43:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35362</guid><dc:creator>m181354</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35362.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=35362</wfw:commentRss><description>&lt;p&gt;Yes it does.&amp;nbsp; It is named &amp;quot;Submit&amp;quot;&lt;/p&gt;</description></item><item><title>Re: The following error occurred:Server was unable to process request. ---&gt; Object reference not set to an instance of an object.</title><link>https://www.infopathdev.com:443/forums/thread/35336.aspx</link><pubDate>Fri, 05 Dec 2008 03:16:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35336</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35336.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=35336</wfw:commentRss><description>&lt;p&gt;Hi Steve,&lt;/p&gt;
&lt;p&gt;Is your data connection named &amp;quot;Submit&amp;quot;? That&amp;#39;s probably the issue. It has to have the same name.&lt;/p&gt;</description></item><item><title>The following error occurred:Server was unable to process request. ---&gt; Object reference not set to an instance of an object.</title><link>https://www.infopathdev.com:443/forums/thread/35309.aspx</link><pubDate>Thu, 04 Dec 2008 16:39:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35309</guid><dc:creator>m181354</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35309.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=35309</wfw:commentRss><description>&lt;p&gt;I get the following error when I try to add a record to a Sharepoint List.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The SOAP response indicates that an error occurred on the server:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Server was unable to process request. ---&amp;gt; Object reference not set to an instance of an object.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;File:script.js&lt;br /&gt;Line:120&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Line 120 is &lt;/strong&gt;XDocument.DataAdapters[&amp;quot;Submit&amp;quot;].Submit(); &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Does anyone know why?&amp;nbsp; I am submitting to&amp;nbsp;the UpdateListItem web service.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Code:&lt;/p&gt;
&lt;p&gt;function btnAdd::OnClick(eventObj)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;var root = XDocument.DOM;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;// Retrieve the values for the calendar item&lt;br /&gt;&amp;nbsp;var title = root.selectSingleNode(&amp;quot;my:myFields/my:myFields1/my:Title&amp;quot;).text;&lt;br /&gt;&amp;nbsp;var location = root.selectSingleNode(&amp;quot;my:myFields/my:myFields1/my:Location&amp;quot;).text;&lt;br /&gt;&amp;nbsp;var description = root.selectSingleNode(&amp;quot;my:myFields/my:myFields1/my:Description&amp;quot;).text;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;var batch = XDocument.DataObjects[&amp;quot;EventCAML&amp;quot;].DOM;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;// Set the location&lt;br /&gt;&amp;nbsp;batch.selectSingleNode(&amp;quot;/Batch/Method/Field[@Name=&amp;#39;Title&amp;#39;]&amp;quot;).text = title;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;// Set the location&lt;br /&gt;&amp;nbsp;batch.selectSingleNode(&amp;quot;/Batch/Method/Field[@Name=&amp;#39;Location&amp;#39;]&amp;quot;).text = location;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;// Set the location&lt;br /&gt;&amp;nbsp;batch.selectSingleNode(&amp;quot;/Batch/Method/Field[@Name=&amp;#39;Description&amp;#39;]&amp;quot;).text = description;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Submit the item details to the web service to update the calendar&amp;nbsp;&lt;br /&gt;&amp;nbsp;XDocument.DataAdapters[&amp;quot;Submit&amp;quot;].Submit(); &lt;br /&gt;&amp;nbsp;XDocument.UI.Alert( &amp;quot;Change Request has been successfully saved&amp;quot; );&amp;nbsp;&amp;nbsp;&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>