Submit form to library using VB code - InfoPath Dev
in

InfoPath Dev

Submit form to library using VB code

Last post 11-03-2009 12:17 PM by bradb. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 10-26-2009 06:29 AM

    • bradb
    • Not Ranked
    • Joined on 10-16-2009
    • Posts 4

    Submit form to library using VB code

    I was working to get an Infopath form to submit the rows of a repeating table to a list. FINALLY got that working the way I wanted, but then an obvious problem popped up, because I'm using a webservice to accomplish the adding to the list, my main submit is now gone. Basically, besides adding the repeating table to a list I need to submit the form itself to a sharepoint library exactly how a normal submit to library would work (linking several fields to the columns in the library). The code I have wrote so far in the custom code section of the submit is in VB.

     Any help would be appreciated!!

     

     

  • 10-30-2009 04:46 PM In reply to

    Re: Submit form to library using VB code

    Okay, so your code is using the Submit form event? You should be able to add another Submit data connection to your form (if your original one to your ShP site isn't still there) and execute it in the same code block. FileSubmitConnection is what you need over at MSDN, and I think the code would be something like:

    FileSubmitConnection fc = (FileSubmitConnection)this.DataConnections["NameOfYourConnectionWhateverThatMayBe"];
    fc.Execute();

    Pardon my semi-colons, not sure of the translation to VB.

    Hilary Stoupa

  • 11-03-2009 12:17 PM In reply to

    • bradb
    • Not Ranked
    • Joined on 10-16-2009
    • Posts 4

    Re: Submit form to library using VB code

    Worked great, thanks!

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.