Programmatically execute without popup window - InfoPath Dev
in

InfoPath Dev

Programmatically execute without popup window

Last post 03-21-2012 04:57 PM by Jo-Anne Alfafara. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 03-21-2012 12:01 AM

    Programmatically execute without popup window

     Hi,

     how can i execute a infopath form without the popup window where i have to press the send button. I want to automatically execute the form with different content and different email-adresses.

     

    This is my vb.net-code

    Dim mySubmit As EmailSubmitConnection = DirectCast(Me.DataConnections("testversand"), EmailSubmitConnection)
    mySubmit.Execute()

     

    This ist the popup-window that i want to disable

    popup 

     

    Many thanks for your help!!!!

  • 03-21-2012 04:18 AM In reply to

    Re: Programmatically execute without popup window

    Hi mikelchris,

    You'd want to make sure that the email data connection is not checked as default submit connection. Also, in the Submit Options dialog, check "Allow users to submit this form" but select the option "Perform custom action using Code", then edit code.

    Can you try that?

    Jo-Anne Alfafara
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™
  • 03-21-2012 05:22 AM In reply to

    Re: Programmatically execute without popup window

    Hi Jo-Anne :-)

     

    I worked with InfoPath 2007 and i dont know how to check if the data connection is not set as default.

    Under "Perform custum action using Code" if have the following and after i pressed the button i get the popup window.

     

    Public Sub FormEvents_Submit(ByVal sender As Object, ByVal e As SubmitEventArgs)
            
                Dim mySubmit As EmailSubmitConnection = DirectCast(Me.DataConnections("testversand"), EmailSubmitConnection)
                mySubmit.Execute()


    End Sub

     

    My Submit.Options

    submit options

     

     My Connection

     submit connection

  • 03-21-2012 06:01 AM In reply to

    Re: Programmatically execute without popup window

    Hi mikelchris,

    I'm on InfoPath 2010, so I'm not sure if that option is available in your data connection wizard.

    So you have this configured in your Submit Options and yet you still get the popup window?

    Jo-Anne Alfafara
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™
  • 03-21-2012 06:07 AM In reply to

    Re: Programmatically execute without popup window

     Yes, with this Submit Options i still get the popup window! :-(

  • 03-21-2012 04:57 PM In reply to

    Re: Programmatically execute without popup window

    It seems that the email data connection is set as a default submit. Instead of using the default submit in InfoPath, try adding a button and add your custom code to that button. =)

    Jo-Anne Alfafara
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.