Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6718723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:00:19+00:00 2026-05-26T09:00:19+00:00

Hopefully you can help. I am working on a Browser Enabled InfoPath 2010 form

  • 0

Hopefully you can help. I am working on a Browser Enabled InfoPath 2010 form that lives in a Document Library on a SharePoint site (2007 and 2010). In this form there is a repeating table with data that needs to be captured for reporting purposes. The solution I have chosen is to use the built in SharePoint lists.asmx Web Service to write the lines in the repeating table to a separate list on the sane SharePoint site, in the same site collection. I used the steps here, http://msdn.microsoft.com/en-us/library/cc162745(v=office.12).aspx, as my baseline.

I have gotten everything set up and working when run directly from the InfoPath form client site. The form opens and, on submit, the rows in the repeating table are written to the SharePoint list without any problems. However, once I deploy the form through Central Admin and test, none of the rows in the repeating table are getting written to the list. There are no errors or anything to indicate a problem with the code, and a boolean field used to indicate whether or not a row has been uploaded is set to true.

My first thought is that there is a problem with the permissions somewhere. Maybe when the service is called from client side it passes my credentials but when run from the server through the Document Library it’s using something different? Shouldn’t it use the credentials that are used to gain access to the SharePoint (which are also my AD credentials)? Is there a way to specify the use of the current users AD credentials when calling the lists.asmx web service in the code?

Anyway, not really sure where else to go with this. Any searching I do comes up with the same how two documentation on submitting to a SharePoint list in general. Any help would be greatly appreciated. Below is the code I am using to accomplish this.

if (MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:ShippingInformation/my:ShipDate", NamespaceManager).Value != "")
            {
                // If Ship Date is not blank, upload items in Material used to SP List where ForQuote is False
                // Quote Number, RMA Number, Ship Date, Unit S/N,

                // Create a WebServiceConnection object for submitting 
                // to the Lists Web service data connection.
                WebServiceConnection wsSubmit =
                   (WebServiceConnection)this.DataConnections["Material Web Service Submit"];

                //Create XPathNodeIterator object for the new Material Lines
                XPathNodeIterator MaterialLines = this.MainDataSource.CreateNavigator().Select("/my:myFields/my:RepairQuote/my:QuoteLines/my:QuoteLine", NamespaceManager);
                int lineCount = 0;

                foreach (XPathNavigator NewLines in MaterialLines)
                {
                    lineCount += 1;
                    if (NewLines.SelectSingleNode(".//my:ForQuote", NamespaceManager).Value == "false" && NewLines.SelectSingleNode(".//my:LineSubmitted", NamespaceManager).Value == "false")
                    {
                        // Set the values in the Add List Item Template 
                        // XML file using the values in the new row.
                        DataSources["AddListItemTemplate"].CreateNavigator().SelectSingleNode("/Batch/Method/Field[@Name='Title']", NamespaceManager).SetValue(NewLines.SelectSingleNode(".//my:lineItem", NamespaceManager).Value);
                        DataSources["AddListItemTemplate"].CreateNavigator().SelectSingleNode("/Batch/Method/Field[@Name='RMANumber']", NamespaceManager).SetValue(MainDataSource.CreateNavigator().SelectSingleNode("./my:myFields/my:EntitlementContainer/my:RMANumber", NamespaceManager).Value);
                        DataSources["AddListItemTemplate"].CreateNavigator().SelectSingleNode("/Batch/Method/Field[@Name='UnitSerialNumber']", NamespaceManager).SetValue(MainDataSource.CreateNavigator().SelectSingleNode("./my:myFields/my:EntitlementContainer/my:serialNumber", NamespaceManager).Value);
                        DataSources["AddListItemTemplate"].CreateNavigator().SelectSingleNode("/Batch/Method/Field[@Name='ShipDate']", NamespaceManager).SetValue(MainDataSource.CreateNavigator().SelectSingleNode("./my:myFields/my:ShippingInformation/my:ShipDate", NamespaceManager).Value);
                        DataSources["AddListItemTemplate"].CreateNavigator().SelectSingleNode("/Batch/Method/Field[@Name='OrderType']", NamespaceManager).SetValue(MainDataSource.CreateNavigator().SelectSingleNode("./my:myFields/my:RepairQuote/my:orderType", NamespaceManager).Value);
                        DataSources["AddListItemTemplate"].CreateNavigator().SelectSingleNode("/Batch/Method/Field[@Name='QuoteNumber']", NamespaceManager).SetValue(MainDataSource.CreateNavigator().SelectSingleNode("./my:myFields/my:RepairQuote/my:quoteNumber", NamespaceManager).Value);
                        DataSources["AddListItemTemplate"].CreateNavigator().SelectSingleNode("/Batch/Method/Field[@Name='LineQuantity']", NamespaceManager).SetValue(NewLines.SelectSingleNode(".//my:lineQuantity", NamespaceManager).Value);
                        DataSources["AddListItemTemplate"].CreateNavigator().SelectSingleNode("/Batch/Method/Field[@Name='LineNumber']", NamespaceManager).SetValue(lineCount.ToString());

                        // Set the value of Cmd attribute to "New".
                        DataSources["AddListItemTemplate"].CreateNavigator().SelectSingleNode("/Batch/Method/@Cmd", NamespaceManager).SetValue("New");

                        // Submit the new row.
                        wsSubmit.Execute();
                        NewLines.SelectSingleNode(".//my:LineSubmitted", NamespaceManager).SetValue("true");
                    }

                }
            }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:00:19+00:00Added an answer on May 26, 2026 at 9:00 am

    Well, I am not sure if it is the answer per se, but I believe the problem was related to security on the site. I got around this by using the SharePoint Object Model instead of the web service to create the list items (See http://www.bizsupportonline.net/browserforms/how-to-use-sharepoint-object-model-submit-data-infopath-browser-form-sharepoint-list.htm). With the SharePoint Object Model I am able to use AllowUnsafeUpdates. Also, where it took me quite a bit of time to get the web service set up, including the data connections, CAML file, etc. This way, however, only took a few minutes. Lesson learned, use the SharePoint Object Model if at all possible.

    foreach (XPathNavigator NewLines in MaterialLines)
                    {
                        lineCount += 1;
                        if (NewLines.SelectSingleNode(".//my:ForQuote", NamespaceManager).Value == "false" && NewLines.SelectSingleNode(".//my:LineSubmitted", NamespaceManager).Value == "false")
                        {
    
                            using (SPSite site = SPContext.Current.Site)
                            {
                                if (site != null)
                                {
                                    using (SPWeb web = site.OpenWeb())
                                    {
                                        // Turn on AllowUnsafeUpdates on the site
                                        web.AllowUnsafeUpdates = true;
    
                                        // Update the SharePoint list based on the values
                                        // from the InfoPath form
                                        SPList list = web.GetList("/Lists/InfoPathRtpItems");
    
                                        if (list != null)
                                        {
                                            SPListItem item = list.Items.Add();
                                            item["Title"] = NewLines.SelectSingleNode(".//my:lineItem", NamespaceManager).Value;
                                            item["RMANumber"] = MainDataSource.CreateNavigator().SelectSingleNode("./my:myFields/my:EntitlementContainer/my:RMANumber", NamespaceManager).Value;
                                            item["UnitSerialNumber"] = MainDataSource.CreateNavigator().SelectSingleNode("./my:myFields/my:EntitlementContainer/my:serialNumber", NamespaceManager).Value;
                                            item["ShipDate"] = MainDataSource.CreateNavigator().SelectSingleNode("./my:myFields/my:ShippingInformation/my:ShipDate", NamespaceManager).Value;
                                            item["OrderType"] = MainDataSource.CreateNavigator().SelectSingleNode("./my:myFields/my:RepairQuote/my:orderType", NamespaceManager).Value;
                                            item["QuoteNumber"] = MainDataSource.CreateNavigator().SelectSingleNode("./my:myFields/my:RepairQuote/my:quoteNumber", NamespaceManager).Value;
                                            item["LineQuantity"] = NewLines.SelectSingleNode(".//my:lineQuantity", NamespaceManager).Value;
                                            item["LineNumber"] = lineCount.ToString();
                                            item.Update();
                                        }
    
                                        // Turn off AllowUnsafeUpdates on the site
                                        web.AllowUnsafeUpdates = false;
    
                                        // Close the connection to the site
                                        web.Close();
                                    }
    
                                    // Close the connection to the site collection
                                    site.Close();
                                }
                            }
                        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hopefully somebody can help me out here. I'm working within an embedded ActionScript2 and
Im working myself into an SQL frenzy, hopefully someone out there can help! I've
I have a quick and hopefully simple question that I hope someone can help
I'm not really sure why this isn't working, hopefully you can help me find
hopefully somebody can help The table structure is as follows: tblCompany: compID compName tblOffice:
Slightly strange question, but hopefully someone can help. In essence, if the time was
Ok, this is bit of an obscure question, but hopefully someone can help me
Hopefully some Custom Control Designers/Builders can help I'm attempting to build my first custom
Hopefully someone can shed a little light on an issue that I'm currently having
I have a weird date rounding problem that hopefully someone can solve. My client

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.