Using "Submit" via Code - InfoPath Dev
in

InfoPath Dev

Using "Submit" via Code

Last post 01-31-2007 12:15 AM by Patrick Halstead. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 01-29-2007 09:50 AM

    Using "Submit" via Code

    Hello All,

    I have an InfoPath web-browser enabled form and I want to use the "submit-function" in InfoPath to store the form in a SharePoint Document Library.

    So far, I know (and it works :-) I can use the submit-options in InfoPath via the GUI. But actually it is recommended using some code for creating the filename. The filename would be providing through a web service.

    The web service writes the filename in a InfoPath field. All fine, but how can I start the submitting process via code in InfoPath 2007? No problem to use the "Main Submit" data connection. Important is, that the submit-process only starts if I click on my button. The only think I want to start with click on my button is to start the submitting process which is defined with InfoPath GUI.

    Thanks!
  • 01-29-2007 11:13 PM In reply to

    Re: Using "Submit" via Code

    Hi,

    yes,when you click on "Submit" button,it will start to submit your form to share point document library, whcih is defined in Infopath GUI.

    Thanks.
    K.Ramana Reddy / http://www.ggktech.com
    India.
  • 01-29-2007 11:44 PM In reply to

    Re: Using "Submit" via Code

    Hmm, this was a question!

    Once again: How can I start the submit process via code in a event handler which is on a button. I do not speak from the InfoPath Toolbar Buttons in the Ribbon. I put a own button named "Save" on the form.

    quote:
    Originally posted by K.Ramana Reddy

    Hi,

    yes,when you click on "Submit" button,it will start to submit your form to share point document library, whcih is defined in Infopath GUI.

    Thanks.

  • 01-30-2007 01:33 AM In reply to

    Re: Using "Submit" via Code

    Hi,

    Double click on the "Save" button and Click on "Edit Form Code", it will go to code view(If you use Visual studio it will go to Formcode.cs or if you scripting it will go to scripting editor(.js or .vbs).
    Then you can start the write code there.

    Thanks.
    K.Ramana Reddy / http://www.ggktech.com
    India.
  • 01-30-2007 07:47 AM In reply to

    Re: Using "Submit" via Code

    Yes, I know but don't know the code I have to write to start the submit process! ;)
  • 01-30-2007 10:57 AM In reply to

    Re: Using "Submit" via Code

    Hi HappyDigit,
    First off: you don't need any code and I recommend against it. If you have code on InfoPath Form Server it will require an admin install, which is a pain and not worth the trouble if you can avoid it, which you can. However, for InfoPath 2007 and InfoPath Form Server - assuming you are running these as browser forms - you will want to create a UDC for them. Search the Microsoft Team Blog for UDC (see a link to their block under our Resources tab) and there's a good post there. I also have a document I can send you. David Airapetyan worked on Form Server and has lots of insights too if you have more trouble.
    Patrick Halstead
    Project Manager at Qdabra
  • 01-30-2007 04:51 PM In reply to

    Re: Using "Submit" via Code

    Patrick has a good point of avoiding using code, but doing a submit from code is actually pretty simple. First, make sure you've got Submit configured, then, in your code, simply write:

    this.Submit()

    Let me know if this helped.
    David Airapetyan / Software Services Architect
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 01-31-2007 12:11 AM In reply to

    Re: Using "Submit" via Code

    Thanks a lot, I found it too, yesterday.
    thx!!

    quote:
    Originally posted by davidair

    Patrick has a good point of avoiding using code, but doing a submit from code is actually pretty simple. First, make sure you've got Submit configured, then, in your code, simply write:

    this.Submit()

    Let me know if this helped.

  • 01-31-2007 12:15 AM In reply to

    Re: Using "Submit" via Code

    Sorry, I didn't respond to your real question! Thanks David.
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.