Help with submitting InfoPath form to SharePoint custom list - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Help with submitting InfoPath form to SharePoint custom list

Last post 09-15-2009 10:52 PM by Daniels. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 12-03-2008 05:48 PM

    • Lepid
    • Not Ranked
    • Joined on 12-04-2008
    • Posts 7

    Help with submitting InfoPath form to SharePoint custom list

    Hello 
    Wondering if someone can help me (I'm relatively new to SharePoint and InfoPath)?

    I'm trying to design an InfoPath form that links to a custom SharePoint list. I've been following the tutorial located at: http://msdn.microsoft.com/en-us/library/cc162745.aspx I can successfully re-create what is mentioned in that tutorial. I then created another new form, this time named fields to my specific requirements (plus added a few extra fields) and also updated/added all references in the Form Code. However when I submit the form, I receive the following error:

    System.NullReferenceException
    Object reference not set to an instance of an object.
       at Template1.FormCode.btnSendChanges_Clicked(Object sender, ClickedEventArgs e)
       at Microsoft.Office.InfoPath.Internal.ButtonEventHost.OnButtonClick(DocActionEvent pEvent)
       at Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent pEvent)
     
    Filed under:
  • 12-03-2008 06:19 PM In reply to

    • Lepid
    • Not Ranked
    • Joined on 12-04-2008
    • Posts 7

    Re: Help with submitting InfoPath form to SharePoint custom list

    I have fixed the form so that it doesn't error when submitted (error was due to spelling) however now it just submits to nowhere, that is the SP list does not update.

  • 09-15-2009 10:52 PM In reply to

    • Daniels
    • Not Ranked
      Male
    • Joined on 07-27-2009
    • Melbourne, Australia
    • Posts 18

    Re: Help with submitting InfoPath form to SharePoint custom list

    Lepid:
    I have fixed the form so that it doesn't error when submitted (error was due to spelling) however now it just submits to nowhere, that is the SP list does not update.

    If you are trying to update data in SharePoint, it can be done either by configuring the Main Submit data source to submit the form to a specified document or form library (with InfoPath form fields mapped to columns in the SharePoint list).  The form will be submitted to the specified SharePoint library, with metadata fields being updated with data from the form.

    See Submit InfoPath form to SharePoint List or Library using Content Type  for instructions on how to submit data to a SharePoint list or library without using code.  A Submit Data Connection can be executed when the form is submitted, or using rules when a condition is met or an event (button click, field change) is fired.

    To update data in a separate list or library to the one that the Infopath form is being submitted to, or to update data in SharePoint from InfoPath without submitting the form to a document or form library, you can set up a data connection to the SharePoint Site Lists Web Service, which accepts a CAML XML document with the required data to add a new or update an existing item in the list.

    See InfoPath - Update Existing SharePoint List Item Programmatically Using CAML  for details and instructions on how to update data in a SharePoint list programmatically using CAML and the Lists Web Service.  Using this method, it is possible to update data in SharePoint without submitting the form to a document or form library.

    Blogs:
    SharePoint Admin & Dev - SharePoint and InfoPath Development

    Web Development & Programming - Php, C#, .NET Framework, SEO Tips

    WebmasterHub.net - Free SEO, Webmaster Resources
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.