Need help with custom submit button - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Need help with custom submit button

Last post 11-16-2009 11:12 AM by KarenSL. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 11-06-2009 06:50 PM

    Need help with custom submit button

    I have a form with a button running rules to submit my form to a SP library and close my form.  Then I added some code to that same button to do some other stuff...this was before I found out that rules run before code.  Now I assume that I need to remove those rules and have the submit done at the end of the code, but I can't find what exactly I need in the code to do this.  I have a data connection for a submit setup (called Main Submit).  I'm coding in VB and I know next to nothing about how to go about coding the submit and close the form.  Everything I've found on the topic is in piecemeal and I can't get the whole puzzle together.

    Other details that may make a difference: browser-enabled form, Infopath 2007, and MOSS 2007

     Please help.

    Thanks!

    Filed under: , ,
  • 11-06-2009 07:46 PM In reply to

    Re: Need help with custom submit button

    To start off, do you really need code in your button to perform the actions you're performing with it?  Can it absolutely not be done without code?

  • 11-06-2009 08:42 PM In reply to

    Re: Need help with custom submit button

     yeah, I went down that path too and I couldn't see another way about it.  The code is setting flags and a counter for the row that was just updated to lock it down when it's been updated so people can't go backwards or screw up the sequence of the department routing.

  • 11-16-2009 11:12 AM In reply to

    Re: Need help with custom submit button

    I got this working.  I used this article as the guideline: http://www.bizsupportonline.net/browserforms/programmatically-submit-infopath-form-sharepoint-send-email-close-form.htm

    In a nutshell the only code I needed to do for the submit (this is VB so no semicolons at the end):

    ' Submit the form to SharePoint - "Main Submit" is the name of the submit datasource used in my form
    Dim spConn As DataConnection = DataConnections("Main Submit")
    spConn.Execute()
    'If the submit operation is successful, set
    e.CancelableArgs.Cancel = False

    Hope this helps someone.

    Karen.

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